RadChartView - sometimes Property Builder of RadChartView is setting HorizontalAxis to be LinearAxis and to VerticalAxis to be DateTimeCategoricalAxis when you select "Linear & Date Time Categorical " which leads to incorrect work of PanZoom. Workaround: Use Smart Tag instead of Property Builder or swap the types of the axes in Design file.
FIX. RadChartView - Vertical Stripes go out of the chart area when PanZoom is using.
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)));
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: Add a RadChartView and add some LineSeries and data points. Set the ShowTrackBall property to true. In some cases KeyNotFound exception occurs. Workaround: Use the following class: public class MyController : ChartTrackballController { protected override string GetTrackballText(List<DataPointInfo> points) { StringBuilder result = new StringBuilder("<html>"); SortedDictionary<ChartSeries, List<DataPoint>> visiblePoints = new SortedDictionary<ChartSeries, List<DataPoint>>(new ChartSeriesComparer()); foreach (DataPointInfo pointInfo in points) { if (visiblePoints.ContainsKey(pointInfo.Series)) { visiblePoints[pointInfo.Series].Add(pointInfo.DataPoint); } else { visiblePoints.Add(pointInfo.Series, new List<DataPoint>() { pointInfo.DataPoint }); } } int counter = 0; foreach (ChartSeries series in visiblePoints.Keys) { for (int i = 0; i < visiblePoints[series].Count; i++) { Color pointColor = this.GetColorForDataPoint(series, visiblePoints[series][i]); string color = string.Format("{0},{1},{2},{3}", pointColor.A, pointColor.R, pointColor.G, pointColor.B); result.AppendFormat("<color={0}>{1}", color, this.GetPointText(visiblePoints[series][i])); if (i < visiblePoints[series].Count) { result.Append(" "); } } counter++; if (counter < visiblePoints.Keys.Count) { result.Append("\n"); } } result.Append("</html>"); return result.ToString(); } class ChartSeriesComparer : IComparer<ChartSeries> { public ChartSeriesComparer() { } public int Compare(ChartSeries x, ChartSeries y) { if (!(x is IndicatorBase) && y is IndicatorBase) { return -1; } else if (x is IndicatorBase && !(y is IndicatorBase)) { return 1; } return x.GetHashCode().CompareTo(y.GetHashCode()); } } } Replace the old controller as follows: for (int i = 0; i < this.radChartView1.Controllers.Count; i++) { if (this.radChartView1.Controllers[i] is ChartTrackballController) { this.radChartView1.Controllers[i] = new MyController(); break; } } Note that the controller must be replaced before any data is added to the chart
RadChartView - user should be able to enter minimum/maximum width for Bars in BarSeries.
It would be very helpful if you either added ScaleBreaks (as in the deprecated RadChart control - http://www.telerik.com/help/winforms/chart-features-scale-breaks.html) or provided an alternative way. I use them a great deal with bar charts and logarithmic scales are not optimal.
Steps to reproduce: 1. Add a pie series to a chart 2. add three data points with values 19,20 and 61 3. Set the series LabelsOffsetFromCenter property to 0.2d 4. Run the project and start reducing the size of the chart. At some point you will see that the position of the label 20% will be incorrect. Second scenario: Add a pie chart and populate it with PieDataPoints, one of which is with value 0: Me.RadChartView1.AreaType = ChartAreaType.Pie Dim series As New PieSeries() series.DataPoints.Add(New PieDataPoint(50, "Germany")) series.DataPoints.Add(New PieDataPoint(70, "United States")) series.DataPoints.Add(New PieDataPoint(40, "France")) series.DataPoints.Add(New PieDataPoint(25, "United Kingdom")) series.DataPoints.Add(New PieDataPoint(0, "Italy")) series.ShowLabels = True Me.RadChartView1.Series.Add(series)
RadChartView cannot read data from integer columns of a DataTable
Steps to reproduce: 1. Set up a pie chart with several segments 2. Set ShowTrackBall property to true 3. Run the project and hover a segment An ArgumentOutOfRange exception will be thrown.
To reproduce: BarSeries barSeries = new BarSeries("Performance", "RepresentativeName"); barSeries.Name = "Q1"; barSeries.DataPoints.Add(new CategoricalDataPoint(177, "Harley")); barSeries.DataPoints.Add(new CategoricalDataPoint(128, "White")); barSeries.DataPoints.Add(new CategoricalDataPoint(143, "Smith")); barSeries.DataPoints.Add(new CategoricalDataPoint(111, "Jones")); barSeries.DataPoints.Add(new CategoricalDataPoint(118, "Marshall")); this.radChartView1.Series.Add(barSeries); this.radChartView1.GetArea<CartesianArea>().Orientation = Orientation.Horizontal;
To reproduce: - Add 3 series to an array and add them to the chart. - Clear the chart series and add them back. - All labels are removed from the chart. Workaround: - Create new series.
The lasso controller does not zoom properly the vertical axis - the interval is not correct. Workaround: public class Lasso : LassoZoomController { protected override ActionResult OnMouseUp(MouseEventArgs e) { if (e.Button != MouseButtons.Left) { return base.OnMouseUp(e); } if (MouseDownLocation != MouseMoveLocation) { Point point = (Point)typeof(LassoZoomController).GetMethod("ClipLocation", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(this, new object[] { e.Location }); this.MouseMoveLocation = point; SizeF areaSize = SizeF.Empty; CartesianArea area = this.Area.View.GetArea<CartesianArea>(); if (area != null) { IChartView chartView = this.Area.View; var temp = area.GetType().GetMethod("GetCartesianClipRect", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).Invoke(area, null); areaSize = ((RectangleF)temp).Size; double delta = this.Area.View.Viewport.Width - areaSize.Width + this.Area.View.Viewport.X; double start = ((this.MouseDownLocation.X - chartView.PlotOriginX - delta) / areaSize.Width / chartView.ZoomWidth) * 100; double end = (MouseMoveLocation.X - chartView.PlotOriginX - delta) / areaSize.Width / chartView.ZoomWidth * 100; double zoomFactor = 100d / Math.Abs(start - end); double deltaHeight = this.Area.View.Viewport.Height - areaSize.Height + this.Area.View.Viewport.Y; double startH = ((this.MouseDownLocation.Y - chartView.PlotOriginY - deltaHeight) / areaSize.Height / chartView.ZoomHeight) * 100; double endH = (MouseMoveLocation.Y - chartView.PlotOriginY - deltaHeight) / areaSize.Height / chartView.ZoomHeight * 100; double zoomFactorH = 100d / Math.Abs(startH - end); if (zoomFactor < 1d) { zoomFactor = 1d; } if (zoomFactor > 100d) { zoomFactor = 100d; } if (zoomFactorH < 1d) { zoomFactorH = 1d; } if (zoomFactorH > 100d) { zoomFactorH = 100d; } double pan = (((areaSize.Width - 1) * zoomFactor) / 100) * Math.Min(start, end); double panH = (((areaSize.Height - 1) * zoomFactorH) / 100) * Math.Min(startH, endH); this.Area.View.Zoom(zoomFactor, zoomFactorH); this.Area.View.Pan(-pan, -panH); } } ViewResult result = typeof(LassoZoomController).GetField("result", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(this) as ViewResult; result.ShouldInvalidate = true; return new ViewResult() { ShouldInvalidate = true }; } }
Allow user to export current view as an image.
If one sets the LabelFormat property of LinearAxis it will not be respected in most cases. Steps to reproduce: 1. Add a LineSeries to a chart 2. Set the VerticalAxis.LabelFormat to "{0:F2}" 3. Run the project You will see that the labels are not formatted.
To reproduce: 1. Perform zoom and pan operation and click the print/print preview button: 2. You will notice that the printed chart is not exactly the same as the displayed one. Please refer to the attached screenshot. public Form1() { InitializeComponent(); LineSeries lineSeries = new LineSeries(); lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan")); lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr")); lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul")); lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct")); this.radChartView1.Series.Add(lineSeries); 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")); this.radChartView1.Series.Add(lineSeries2); ChartPanZoomController panZoomController = new ChartPanZoomController(); panZoomController.PanZoomMode = ChartPanZoomMode.Horizontal; radChartView1.Controllers.Add(panZoomController); } private void radButton1_Click(object sender, EventArgs e) { this.radChartView1.PrintPreview(); } 3.The issue also appears when the LassoZoomController is used.
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
Currently, there seems to be no convenient API for formatting data point elements. There is a CreatePointElement event, which however does not work properly.
RadChartView should have empty values support just like RadChart had it.