Currently the PieRenderer class is private and cannot be inherited nor extended. All other renderer classes are public.
Until the feature gets implemented please use the suggested solution here: http://www.telerik.com/support/kb/winforms/details/integrating-panzoom-trackball-and-lassozoom-controllers-in-radchartview
To reproduce: - Add DateTimeContinuousAxis to a chart and set its MajorStep property. Workaround: Create the DateTimeContinuousAxis in the code behind.
Adding a series with null values and combine mode Stack or Stack100 results in an exception.
To reproduce: - Just add StochasticSlowIndicator to a chart.
Inside the constructor of a form create a pie series and populate it with data. Then add it to a RadChartView. You will notice that there are two legend items per data point.
To reproduce: - Implement the drill down functionality with a PieSeries. - Workaround: class MyPieSeries : PieSeries, ILegendInfoProvider { public LegendItemCollection LegendInfos { get { return new LegendItemCollection(); } } }
To reproduce use the following code: public Form1() { InitializeComponent(); radChartView1.AreaType = Telerik.WinControls.UI.ChartAreaType.Pie; radChartView1.ShowLegend = true; series.ValueMember = "CategoryID"; series.DisplayMember = "CategoryName"; series.DataSource = this.nwindDataSet1.Categories; radChartView1.Series.Add(series); } private void radButton1_Click(object sender, EventArgs e) { this.categoriesTableAdapter.Fill(this.nwindDataSet1.Categories); } private void Form1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'nwindDataSet1.Categories' table. You can move, or remove it, as needed. this.categoriesTableAdapter.Fill(this.nwindDataSet1.Categories); } Workaround: - Clear the items manually: this.radChartView1.ChartElement.LegendElement.StackElement.Children.Clear();
To reproduce: Create a RadChartView, add a ZoomController and set the ShowGrid property to true: ScatterSeries series = new ScatterSeries(); series.DataPoints.Add(new ScatterDataPoint(5, 5)); series.DataPoints.Add(new ScatterDataPoint(4, 2)); series.DataPoints.Add(new ScatterDataPoint(-1, 3)); series.DataPoints.Add(new ScatterDataPoint(11, 4)); chart.Series.Add(series); chart.Controllers.Add(new LassoZoomController()); chart.ShowGrid = true; You will see that the grid is painted outside of the chart area where the points are
To reproduce: use the following code snippet: Random rand = new Random(); List<LineSeries> list = new List<LineSeries>(); for (int i = 0; i < 15; i++) { LineSeries ls = new LineSeries(); ls.LegendTitle = "Series" + i; list.Add(ls); } for (int i = 0; i < 1000; i++) { foreach (LineSeries s in list) { s.DataPoints.Add(new CategoricalDataPoint(i, rand.Next(0, rand.Next(5, 20)))); } } radChartView1.Series.AddRange(list.ToArray()); this.radChartView1.ChartElement.LegendPosition = LegendPosition.Bottom; this.radChartView1.ChartElement.LegendElement.StackElement.Orientation = Orientation.Horizontal; Resolution: The issue is duplicated with item IMPROVE. RadChartView - ChartLegend should be able to wrap its items. From Q1 2015 when there are many items in the chart legend a scroll bar will appear so users can scroll through the items. More info in the following feedback item http://feedback.telerik.com/Project/154/Feedback/Details/149848-add-radchartview-when-the-legend-has-many-items-a-scrollbar-should-appear
To reproduce: Create a RadChartView with LineSeries. Subscribe to the CreatePointElement event and use the following code: void Chart_CreatePointElement(object sender, ChartViewCreatePointElementEventArgs e) { e.DataPointElement = new DataPointElement(e.DataPoint); e.DataPointElement.GradientStyle = GradientStyles.Solid; e.DataPointElement.GradientAngle = 270; e.DataPointElement.Shape = new DiamondShape(); e.DataPointElement.BackColor = Color.Red; e.DataPointElement.BackColor2 = Color.Blue; e.DataPointElement.BackColor3 = Color.Blue; e.DataPointElement.BackColor4 = Color.Blue; } The elements paint when you use ChamferedRectShape. Workaround class MyDiamondShape : ElementShape { public override GraphicsPath CreatePath(Rectangle bounds) { GraphicsPath path = new GraphicsPath(); path.AddPolygon(new PointF[] { new PointF(bounds.X + 0.5f * bounds.Width, bounds.Top), new PointF(bounds.Right, bounds.Y + 0.5f * bounds.Height), new PointF(bounds.X + 0.5f * bounds.Width, bounds.Bottom), new PointF(bounds.Left, bounds.Y + 0.5f * bounds.Height) }); return path; } } class MyStarShape : ElementShape { private int arms; private float innerRadiusRatio; public MyStarShape() { this.arms = 8; this.innerRadiusRatio = 0.2f; } /// <summary> /// Creates Star like shape. Overrides CreatePath method in the base class /// ElementShape. /// </summary> public override GraphicsPath CreatePath(Rectangle bounds) { GraphicsPath path = new GraphicsPath(); double angle = Math.PI / arms; double offset = Math.PI / 2d; PointF center = new PointF(bounds.X + bounds.Width / 2f, bounds.Y + bounds.Height / 2f); PointF[] points = new PointF[arms * 2]; for (int i = 0; i < 2 * arms; i++) { float r = (i & 1) == 0 ? bounds.Width / 2f : bounds.Width / 2f * innerRadiusRatio; float currX = center.X + (float)Math.Cos(i * angle - offset) * r; float currY = center.Y + (float)Math.Sin(i * angle - offset) * r; points[i] = new PointF(currX, currY); } path.AddPolygon(points); return path; } } class MyHeartShape : ElementShape { public override GraphicsPath CreatePath(Rectangle bounds) { GraphicsPath path = new GraphicsPath(); path.AddArc(new Rectangle(bounds.X, bounds.Y, bounds.Width / 2, bounds.Height / 2), 150, 210); path.AddArc(new Rectangle(bounds.X + bounds.Width / 2, bounds.Y, bounds.Width / 2, bounds.Height / 2), 180, 210); path.AddLine(path.GetLastPoint(), new Point(bounds.X + bounds.Width / 2, bounds.Bottom)); path.CloseFigure(); return path; } }
To reproduce: AreaSeries areaSeries = new AreaSeries(); areaSeries.DataPoints.Add(new CategoricalDataPoint(13, "Jan")); areaSeries.DataPoints.Add(new CategoricalDataPoint(20, "Apr")); areaSeries.DataPoints.Add(new CategoricalDataPoint(15, "Jul")); areaSeries.DataPoints.Add(new CategoricalDataPoint(16, "Oct")); this.radChartView1.Series.Add(areaSeries); areaSeries.BackColor = Color.Transparent; areaSeries.CombineMode = ChartSeriesCombineMode.Stack; AreaSeries areaSeries2 = new AreaSeries(); areaSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Jan")); areaSeries2.DataPoints.Add(new CategoricalDataPoint(25, "Apr")); areaSeries2.DataPoints.Add(new CategoricalDataPoint(27, "Jul")); areaSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Oct")); this.radChartView1.Series.Add(areaSeries2); areaSeries2.CombineMode = ChartSeriesCombineMode.Stack; The area underneath the transparent one shouldn't be displayed in this case because they are stacked. There is no area underneath the bottom layer to display. They are each STACKED on top of each other, they should not be layered in front of each other.
To reproduce: - Add two donut series and set their RadiusFactor so both series can be seen. - Add ChartSelectionController. - You will be able to select points from the firs series only. Workaround: class MyPieRenderer : PieRenderer { public MyPieRenderer(PieArea area) : base(area) { } public override DataPoint HitTest(int x, int y) { if (this.DrawParts.Count > 0) { foreach (var item in this.DrawParts) { if (item is PieSeriesDrawPart) { Dictionary<PieDataPoint, GraphicsPath> paths = ((PieSeriesDrawPart)item).PointPaths; foreach (PieDataPoint point in paths.Keys) { GraphicsPath path = new GraphicsPath(); paths.TryGetValue(point, out path); if (path != null) { if (path.IsVisible(x, y)) { return point; } } } } } } return null; } } private void RadChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e) { e.Renderer = new MyPieRenderer((PieArea)e.Area); }
Gets the range that is actually visible on the plot area when the chart is zoomed in.
Use the attached project to reproduce. Workaround: Hide the panel after the form is shown.
To reproduce: - Localize the palette names with the localization provider. - Change the palette with the context menu. Workaround: class MyChartDataPointElementController : ChartDataPointElementController { protected override RadContextMenu CreatePaletteMenu() { RadContextMenu menu = new RadContextMenu(); RadChartLocalizationProvider localizationProvider = RadChartLocalizationProvider.CurrentProvider; RadMenuItem paletteItem = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.Palette)); menu.Items.Add(paletteItem); RadMenuItem item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteArctic)); item.Click += new System.EventHandler(item_Click); item.Tag = "Arctic"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteAutumn)); item.Click += new System.EventHandler(item_Click); item.Tag = "Autumn"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteCold)); item.Click += new System.EventHandler(item_Click); item.Tag = "Gold"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteFlower)); item.Click += new System.EventHandler(item_Click); item.Tag = "Flower"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteForest)); item.Click += new System.EventHandler(item_Click); item.Tag = "Forest"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteGrayscale)); item.Click += new System.EventHandler(item_Click); item.Tag = "Grayscale"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteGround)); item.Click += new System.EventHandler(item_Click); item.Tag = "Ground"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteLilac)); item.Click += new System.EventHandler(item_Click); item.Tag = "Lilac"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteMetro)); item.Click += new System.EventHandler(item_Click); item.Tag = "Metro"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteNatural)); item.Click += new System.EventHandler(item_Click); item.Tag = "Natural"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PalettePastel)); item.Click += new System.EventHandler(item_Click); item.Tag = "Pastel"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteRainbow)); item.Click += new System.EventHandler(item_Click); item.Tag = "Rainbow"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteSpring)); item.Click += new System.EventHandler(item_Click); item.Tag = "Spring"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteSummer)); item.Click += new System.EventHandler(item_Click); item.Tag = "Summer"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteWarm)); item.Click += new System.EventHandler(item_Click); item.Tag = "Warm"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteWindows8)); item.Click += new System.EventHandler(item_Click); item.Tag = "Windows8"; paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteSun)); item.Click += new System.EventHandler(item_Click); item.Tag = "Sun"; paletteItem.Items.Add(item); return menu; } void item_Click(object sender, System.EventArgs e) { RadMenuItem item = sender as RadMenuItem; if (item != null) { this.Area.View.Palette = ChartPalette.FromKnownPalette(item.Tag.ToString()); } } } // change the controller this.radChartView1.Controllers.Add(new MyChartDataPointElementController());
ADD. RadChartView - add waterfall series type.