Add Bubble series support for RadChartView
The lasso controller should zoom vertically as well.
With significant number of points in pie series and with very small values as data points, the default chart strategy for positioning smart labels overlaps the values. Note: the smart labels overlapping can be reproduced with DonutSeries as well.
Add vertical cursors for Line series that stay in place unless the user drags them. Each cursor should select the data points that covers. The cursor should allow setting its position programmatically.
I'm using version 2012.3.1310.40 I use ChartView to create a pie chart with the following data Assets 2248550.22 Income 19748.67 Equity 2228253.95 Liability 547.60 So, when the chart displays, the Percentage is set as follows: Assets 50% Income 0% Equity 50% Liability 0% I notice when the percentage is 0% for any data, the pie chart shows "0%" near the chart title (please see attachment). Or if the calculated data returns 0, it doesn't show any percentage on the chart, but it will shows "NaN" near the title as well. (please see attachment).
SmartLabelsController - PieTwoLabelColumnsStrategy throws exception if the series has two or more DataPoints with value "0"; Code to reproduce: RadChartView pieChart = new RadChartView(); pieChart.AreaType = ChartAreaType.Pie;
RadChartView - Palette of the Series should be with higher priority than Area.View.Palette.
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
Adding a series with null values and combine mode Stack or Stack100 results in an exception.
To reproduce: Use the following code with RadChartView: this.Chart.Series.Add(new LineSeries()); for (int i = 0; i < 50; i++) { if (i == 10) { this.Chart.Series[0].DataPoints.Add(new CategoricalDataPoint(1)); continue; } this.Chart.Series[0].DataPoints.Add(new CategoricalDataPoint(0)); } this.Chart.ShowGrid = true; You will see that the point will not be rendered correctly and will be taller than 1.
Currently the PieRenderer class is private and cannot be inherited nor extended. All other renderer classes are public.
Steps to reproduce: 1. Clear all series and axes from a chart 2. Create new axes and series and databind the series 3. Add the new series and axes to the chart 4. Repeat the steps above multiple times
To reproduce: Have a RadButton and a RadChartView on a form. On button click use the following code: private void GenerateSeries() { LineSeries lineSeries = new LineSeries(); lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan") { Label = "January" }); lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr")); lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul")); lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct")); lineSeries.LegendTitle = "Line 1 "; this.Chart.Series.Add(lineSeries); lineSeries.BackColor = Color.Black; lineSeries.PointSize = new SizeF(15, 15); LineSeries lineSeries2 = new LineSeries(); lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Jan")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct")); lineSeries2.LegendTitle = "Line 2 "; this.Chart.Series.Add(lineSeries2); } void RadButton_Click(object sender, EventArgs e) { this.Chart.Series.Clear(); this.GenerateSeries(); } You will notice that the memory will not decrease after a few presses of the button. Workaround: Set the Provider of the LegendElement to null: private void GenerateSeries() { this.Chart.ChartElement.LegendElement.Provider = null; LineSeries lineSeries = new LineSeries(); lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan") { Label = "January" }); lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr")); lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul")); lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct")); lineSeries.LegendTitle = "Line 1 "; this.Chart.Series.Add(lineSeries); lineSeries.BackColor = Color.Black; lineSeries.PointSize = new SizeF(15, 15); LineSeries lineSeries2 = new LineSeries(); lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Jan")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct")); lineSeries2.LegendTitle = "Line 2 "; this.Chart.Series.Add(lineSeries2); } void Button_Click(object sender, EventArgs e) { this.Chart.Series.Clear(); this.GenerateSeries(); }
RadChartView should have empty values support just like RadChart had it.
Currently, there seems to be no convenient API for formatting data point elements. There is a CreatePointElement event, which however does not work properly.
To reproduce: Setup the following RadChartView: this.Chart.ShowLegend = true; this.Chart.Series.Add(new LineSeries() { LegendTitle = "DDDD" }); this.Chart.ChartElement.LegendElement.Items[0].Element.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot; for (int i = 0; i < 10; i++) { this.Chart.Series[0].DataPoints.Add(i); } You will see that although that you have changed the BorderDashStyle of the Element, the LineSerie will be drawn normally.
Currently RadChartView does not support null values.
RadChartView - DateTimeContinueAxis ignores the MaximumTicks property with some specific data points. Steps to reproduce: Use the following points: points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2007, 7, 24))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2007, 10, 30))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2008, 4, 29))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2008, 10, 27))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2009, 4, 1))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2010, 6, 28))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2010, 10, 7))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2011, 4, 19))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2011, 9, 27))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2012, 1, 10))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2012, 4, 11))); points.Add(new CategoricalDataPoint(r.Next(0, 100), new DateTime(2012, 10, 16)));
To reproduce: use the following code snippet public Form1() { InitializeComponent(); ScatterLineSeries scatterSeries = new ScatterLineSeries(); scatterSeries.DataPoints.Add(new ScatterDataPoint(15, 19)); scatterSeries.DataPoints.Add(new ScatterDataPoint(18, 10)); scatterSeries.DataPoints.Add(new ScatterDataPoint(13, 15)); scatterSeries.DataPoints.Add(new ScatterDataPoint(10, 8)); scatterSeries.DataPoints.Add(new ScatterDataPoint(5, 2)); scatterSeries.PointSize = new SizeF(8, 8); this.radChartView1.Series.Add(scatterSeries); ScatterLineSeries scatterSeries2 = new ScatterLineSeries(); scatterSeries2.DataPoints.Add(new ScatterDataPoint(2, 24)); scatterSeries2.DataPoints.Add(new ScatterDataPoint(7, 12)); scatterSeries2.DataPoints.Add(new ScatterDataPoint(15, 10)); scatterSeries2.DataPoints.Add(new ScatterDataPoint(18, 22)); scatterSeries2.DataPoints.Add(new ScatterDataPoint(20, 20)); scatterSeries2.Shape = new RoundRectShape(1); scatterSeries2.PointSize = new SizeF(8, 8); this.radChartView1.Series.Add(scatterSeries2); ChartTooltipController toolTipController = new ChartTooltipController(); radChartView1.Controllers.Add(toolTipController); } Workaround: use custom renderer public Form1() { InitializeComponent(); this.radChartView1.CreateRenderer += radChartView1_CreateRenderer; } private void radChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e) { e.Renderer = new CustomCartesianRenderer(e.Area as CartesianArea); } public class CustomCartesianRenderer : CartesianRenderer { public CustomCartesianRenderer(CartesianArea area) : base(area) { } protected override void Initialize() { base.Initialize(); for (int i = 0; i < this.DrawParts.Count; i++) { ScatterSeriesDrawPart scatterPart = this.DrawParts[i] as ScatterSeriesDrawPart; if (scatterPart != null) { this.DrawParts[i] = new CustomScatterSeriesDrawPart((ScatterLineSeries)scatterPart.Element, this); } } } } public class CustomScatterSeriesDrawPart : ScatterLineSeriesDrawPart { public CustomScatterSeriesDrawPart(ScatterLineSeries series, IChartRenderer renderer) : base(series, renderer) { } public override DataPoint HitTest(Point location) { for (int i = 0; i < this.Element.DataPoints.Count; i++) { RadRect slot = this.Element.DataPoints[i].LayoutSlot; float pointHalfWidth = this.Element.PointSize.Width / 2; float pointHalfHeight = this.Element.PointSize.Height / 2; RectangleF scatterBounds = new RectangleF((float)(this.OffsetX + slot.X - pointHalfWidth), (float)(this.OffsetY + slot.Y - pointHalfHeight), this.Element.PointSize.Width, this.Element.PointSize.Height); if (scatterBounds.Contains(location.X, location.Y)) { return this.Element.DataPoints[i]; } } return null; } }