Steps to reproduce: 1. On a button click create a chart, add series and a data source. 2. Call the Dispose method of the chart. You will notice that the memory allocated by the chart will not be released Workaround: clear the series before you dispose of the chart.
When the legend has many items a scrollbar should appear.
To reproduce: - Start the Q3 2014 SP1 demo application. - Open the Bar example. - Set the orientation to horizontal. In addition please note that the first and the last labels of the horizontal axis are missing as well. Workaround: CategoricalAxis vertiacalAxis = radChartView1.Axes[1] as CategoricalAxis; if (vertiacalAxis != null) { vertiacalAxis.LabelFitMode = AxisLabelFitMode.Rotate; vertiacalAxis.LabelRotationAngle = .1; }
To reproduce: public Form1() { InitializeComponent(); 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(8, 4)); radChartView1.Series.Add(series); LinearAxis horizontalAxis = radChartView1.Axes.Get<LinearAxis>(0); horizontalAxis.Minimum = -10; horizontalAxis.Maximum = 10; } private void radButton1_Click(object sender, EventArgs e) { LinearAxis horizontalAxis = radChartView1.Axes.Get<LinearAxis>(0); horizontalAxis.DesiredTickCount = 20; }
Add several data points with date time objects as their categories. Make sure the time span these date time objects is within a few seconds. You will see that not all labels will be displayed by the chart.
To reproduce: protected override void OnLoad(EventArgs e) { base.OnLoad(e); InitializeComponent(); radChartView1 = new RadChartView(); this.Controls.Add(radChartView1); DateTimeContinuousAxis asseX = new DateTimeContinuousAxis(); LinearAxis asseY = new LinearAxis(); asseY.AxisType = AxisType.Second; asseY.Minimum = 0; asseY.Maximum = 200; asseY.HorizontalLocation = Telerik.Charting.AxisHorizontalLocation.Right; asseY.LabelFormat = "{0} °C"; LineSeries serie = new LineSeries(); serie.DataPoints.Add(new CategoricalDataPoint(150, DateTime.Now)); serie.VerticalAxis = asseY; serie.HorizontalAxis = asseX; radChartView1.Series.Add(serie); } Workaround is available in the attached project.
To reproduce: SteplineSeries stepLineSeries = new SteplineSeries(); stepLineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jan")); stepLineSeries.DataPoints.Add(new CategoricalDataPoint(42, "Apr")); stepLineSeries.DataPoints.Add(new CategoricalDataPoint(28, "Jul")); stepLineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Oct")); this.radChartView1.Series.Add(stepLineSeries); CartesianArea area = this.radChartView1.Area as CartesianArea ; area.Orientation = Orientation.Horizontal; Please refer to the attached screenshots. Workaround: use LineSeries with custom CartesianRenderer: public Form1() { InitializeComponent(); this.radChartView1.CreateRenderer += radChartView1_CreateRenderer; LineSeries lineSeries = new LineSeries(); lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jan")); lineSeries.DataPoints.Add(new CategoricalDataPoint(42, "Apr")); lineSeries.DataPoints.Add(new CategoricalDataPoint(28, "Jul")); lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Oct")); this.radChartView1.Series.Add(lineSeries); CartesianArea area = this.radChartView1.Area as CartesianArea ; area.Orientation = Orientation.Horizontal; } private void radChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e) { e.Renderer = new CustomCartesianRenderer((CartesianArea)e.Area); } 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++) { LineSeriesDrawPart drawPart = this.DrawParts[i] as LineSeriesDrawPart; if (drawPart != null) { this.DrawParts[i] = new CustomLineDrawPart((LineSeries)drawPart.Element, this); } } } } public class CustomLineDrawPart : LineSeriesDrawPart { public CustomLineDrawPart(LineSeriesBase series, IChartRenderer renderer) : base(series, renderer) { } protected override GraphicsPath GetLinePaths(PointF[] points) { GraphicsPath path = new GraphicsPath(); PointF x; PointF y; List<PointF> pointsList = points.ToList(); CartesianArea area = this.Element.Parent as CartesianArea; if (area != null && area.Orientation == Orientation.Horizontal) { pointsList = pointsList.OrderBy(p => p.Y).ThenBy(p => p.X).ToList(); } if (pointsList.Count > 1) { for (int i = 1; i < pointsList.Count; i++) { x = pointsList[i - 1]; y = pointsList[i]; path.AddLine(x.X, x.Y, y.X, x.Y); path.AddLine(y.X, x.Y, y.X, y.Y); } } else { return null; } return path; } }
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.
Add Range series similar to those provided by WPF/SL http://demos.telerik.com/silverlight/#ChartView/Gallery/Range
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 }; } }
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.
Steps to reproduce: 1. Add a RadChartView to a form. 2. Add a LassoZoomController to the chart 3. Run the project and start scrolling the mouse wheel. You will see that the chart is not zoomed in our out. If you click on the chart the mouse wheel zooms as expected. WORKAROUND: Set the focus to the chart element: this.radChartView1.Behavior.ItemCapture = this.radChartView1.ChartElement; this.radChartView1.ChartElement.Focus();
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;
The lasso controller should zoom vertically as well.
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.
Currently, when you zoom in and out, the position the mouse is initially hovering is not kept, while it should
Telerik.Charting namespace exist in the WinForms and the WFP assemblies and one cannot reference both in a single project.