To reproduce: -add RadChartView and use the following code: public Form1() { InitializeComponent(); radChartView1.SelectionMode = ChartSelectionMode.MultipleDataPoints; MessageBox.Show(radChartView1.SelectionMode.ToString()); radChartView1.SelectionMode = ChartSelectionMode.MultipleDataPoints; MessageBox.Show(radChartView1.SelectionMode.ToString()); }
Zooming out of RadChartView affects the vertical axis labels
To reproduce: -add RadChartView and use the following code: this.radChartView1.AreaType = ChartAreaType.Pie; PieSeries series = 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.ShowLabels = true; this.radChartView1.Series.Add(series); Workaround: recreate the ChartDataPointElementController: this.radChartView1.AreaType = ChartAreaType.Pie; this.radChartView1.Controllers.RemoveAt(0); this.radChartView1.Controllers.Add(new ChartDataPointElementController()); PieSeries series = 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.ShowLabels = true; this.radChartView1.Series.Add(series);
The Step Line chart type is similar to the Line chart type, but it does not use the shortest distance to connect two data points. Instead, this chart type uses vertical and horizontal lines to connect the data points in a series forming a step-like progression.
The last one or two characters of axis titles are cut off.
To reproduce: 1.Add RadChartView 2.Set vertical axis to be LinearAxis 3.Add DataPoints with value with 14 or more digits. 4.Set FormatLabel = {0:C} or {0:F0} 5.Run project and will see that labels overlaps vertical axis. Workaround: Use custom format provider this.radChartView1.Axes[1].LabelFormatProvider = new MyFormatProvider();
I have use following code to use Both Scrollbar in RadChartView While Zoom. but it not scroll my chart . radchart1.HorizontalScroll.Enabled = true; radchart1.HorizontalScroll.Visible = true; radchart1.VerticalScroll.Enabled = true; radchart1.VerticalScroll.Visible = true; Please help me. Hello Kalpesh, Currently panning in RadChartView cannot be performed using the scrollbars. We have a feature request logged here: https://feedback.telerik.com/Project/154/Feedback/Details/111013-add-radchartview-add-a-scrollbar-that-controls-the-pan-and-zoom Please subscribe to the item so that you be updated when its status changes. For the time being I can suggest using a RadRangeSelector control to zoom and pan the chart. More information is available here: https://docs.telerik.com/devtools/winforms/rangeselector/overview Regards, Hristo
To reproduce: AddChartView(); radChartView1.ShowGrid = true; CartesianGrid grid = ((CartesianGrid)radChartView1.GetArea<CartesianArea>().Grid); grid.DrawVerticalFills = true; grid.AlternatingHorizontalColor = false; grid.AlternatingVerticalColor = false; grid.BackColor = Color.Red; grid.ForeColor = Color.Blue; grid.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Solid;
Now I got stuck when trying to give the Y-values displayed in the Chart another format (currency): I`m setting LineSeries instance properties "DisplayMember" without achieving an effect i.e. the values are displayed the same way as if DisplayMember was not set (f.e. 4995148.92 instead of 4.995.148.92 €).
To reproduce: this.chart.Controllers.Add(new ChartTrackballController()); this.chart.Dock = DockStyle.Fill; this.chart.AreaType = ChartAreaType.Cartesian; LineSeries lineSeries1 = new LineSeries(); lineSeries1.Name = "Line 1"; lineSeries1.DataPoints.Add(new CategoricalDataPoint(10, "1")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(4, "2")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(23, "3")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(11, "4")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(15, "5")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(10, "6")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(4, "7")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(7, "8")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(11, "9")); lineSeries1.DataPoints.Add(new CategoricalDataPoint(15, "10")); this.chart.Series.Add(lineSeries1); LineSeries lineSeries2 = new LineSeries(); lineSeries2.Name = "Line 2"; lineSeries2.DataPoints.Add(new CategoricalDataPoint(6, "1")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(20, "2")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(7, "3")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(8, "4")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(4, "5")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(10, "6")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(24, "7")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "8")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "9")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(43, "10")); this.chart.Series.Add(lineSeries2); this.chart.ShowTrackBall = true; For workaround, use this class: public class MyTrackBallController : ChartTrackballController { protected override string GetTrackballText(List<DataPointInfo> points) { StringBuilder result = new StringBuilder("<html>"); SortedDictionary<Telerik.WinControls.UI.ChartSeries, List<DataPoint>> visiblePoints = new SortedDictionary<Telerik.WinControls.UI.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 (Telerik.WinControls.UI.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<Telerik.WinControls.UI.ChartSeries> { public int Compare(Telerik.WinControls.UI.ChartSeries x, Telerik.WinControls.UI.ChartSeries y) { if (!(x is IndicatorBase) && y is IndicatorBase) { return -1; } else if (x is IndicatorBase && !(y is IndicatorBase)) { return 1; } if (x.Equals(y)) { return 0; } return 1; } } }
https://demos.telerik.com/kendo-ui/radar-charts/radar-column The attached proejct shows a sample implementation.
Workaround: public class MyRadChartView : RadChartView { public override string ThemeClassName { get { return typeof(RadChartView).FullName; } } protected override void Dispose(bool disposing) { base.Dispose(false); } }
How to reproduce: check the attached project Workaround: private void button1_Click(object sender, EventArgs e) { this.radChartView1.DataSource = null; foreach (ChartSeries series in this.radChartView1.Series) { series.DataSource = null; } this.radChartView1.Series.Clear(); }
Use the code below and reduce the Form size to see the extra line: public Form1() { InitializeComponent(); radChartView1.Parent = this; radChartView1.Dock = DockStyle.Fill; radChartView1.ShowLegend = true; radChartView1.ShowGrid = true; CartesianGrid grid = ((CartesianGrid)radChartView1.GetArea<CartesianArea>().Grid); grid.DrawVerticalFills = true; grid.AlternatingHorizontalColor = false; grid.AlternatingVerticalColor = false; grid.BackColor = Color.Red; grid.ForeColor = Color.Blue; grid.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Solid; DateTimeContinuousAxis horizontalAxis = new DateTimeContinuousAxis(); horizontalAxis.MajorStepUnit = Telerik.Charting.TimeInterval.Day; horizontalAxis.MajorStep =2; horizontalAxis.LabelFormat = "{0:dd/MM/yyyy}"; LinearAxis verticalAxis1 = new LinearAxis(); verticalAxis1.AxisType = AxisType.Second; LinearAxis verticalAxis2 = new LinearAxis(); verticalAxis2.AxisType = AxisType.Second; verticalAxis2.HorizontalLocation = AxisHorizontalLocation.Right; LineSeries line1 = new LineSeries(); line1.HorizontalAxis = horizontalAxis; line1.VerticalAxis = verticalAxis1; LineSeries line2 = new LineSeries(); line2.HorizontalAxis = horizontalAxis; line2.VerticalAxis = verticalAxis2; line1.DataPoints.Add(new CategoricalDataPoint(26d, DateTime.Now.AddDays(-6))); line1.DataPoints.Add(new CategoricalDataPoint(20d, DateTime.Now.AddDays(-5))); line1.DataPoints.Add(new CategoricalDataPoint(12d, DateTime.Now.AddDays(-4))); line1.DataPoints.Add(new CategoricalDataPoint(15d, DateTime.Now.AddDays(-2))); line1.DataPoints.Add(new CategoricalDataPoint(21d, DateTime.Now.AddDays(-1))); line2.DataPoints.Add(new CategoricalDataPoint(32d, DateTime.Now.AddDays(-6))); line2.DataPoints.Add(new CategoricalDataPoint(52d, DateTime.Now.AddDays(-4))); line2.DataPoints.Add(new CategoricalDataPoint(35d, DateTime.Now.AddDays(-3))); line2.DataPoints.Add(new CategoricalDataPoint(36d, DateTime.Now.AddDays(-2))); line2.DataPoints.Add(new CategoricalDataPoint(11d, DateTime.Now.AddDays(-1))); line1.LegendTitle = "line1"; line2.LegendTitle = "line2"; this.radChartView1.Series.Add(line1); this.radChartView1.Series.Add(line2); }
Add method to zoom by specified parameters
To reproduce: DataTable table = new DataTable(); table.Columns.Add("CategoryName"); table.Columns.Add("Sales"); table.Rows.Add("Beverages", 102074.31); table.Rows.Add("Condiments", 55277.6); table.Rows.Add("Confections", 80894.14); table.Rows.Add("Diary Products", 114749.78); table.Rows.Add("Grains/Cereals", 55948.82); table.Rows.Add("Meat/Poultry", 81338.06); table.Rows.Add("Produce", 53019.98); table.Rows.Add("Seafood", 65544.18); var result = table.AsEnumerable().Take(5); this.radChartView1.AreaType = ChartAreaType.Pie; PieSeries series = new PieSeries(); radChartView1.Series.Add(series); series.ShowLabels = true; series.ValueMember = "Sales"; series.DisplayMember = "CategoryName"; series.DataSource = result.ToList(); The last row will produce invalid binding. Here is a valid binding in this scenario: using System; using System.Data; using System.Linq; using System.Windows.Forms; using Telerik.WinControls.UI; namespace Lab.Chart { public partial class ChartBindToEnumerableForm : Form { private RadChartView chartView = new RadChartView(); public ChartBindToEnumerableForm() { InitializeComponent(); chartView.Dock = DockStyle.Fill; chartView.Parent = this; } protected override void OnLoad(EventArgs e) { base.OnLoad(e); DataTable table = new DataTable(); table.Columns.Add("CategoryName"); table.Columns.Add("Sales"); table.Rows.Add("Beverages", 5); table.Rows.Add("Condiments", 5); table.Rows.Add("Confections", 4); table.Rows.Add("Diary Products", 4); table.Rows.Add("Grains/Cereals", 23); table.Rows.Add("Meat/Poultry", 2); table.Rows.Add("Produce", 1); table.Rows.Add("Seafood", 3); var result = table.AsEnumerable().Take(5); chartView.AreaType = ChartAreaType.Cartesian; BarSeries series = new BarSeries(); chartView.Series.Add(series); series.ShowLabels = true; series.ValueMember = "Sales"; series.CategoryMember = series.DisplayMember = "CategoryName"; //series.DataSource = result.ToList(); WRONG WAY!!!, produce list of DataRows, which related to DataTable, DataView implementation of custom PropertyDescriptoCollection will generated errors and invalid binding for all list binding controls: grid, list, combo, chart, listview series.DataSource = result.CopyToDataTable(); } } }
FIX. RadChartView - the Arctic palette menu item appears twice in the context menu
Add BarSeries with several CategoricalDataPoint with some long category text. Change the chart's area orientation, then you will notice that the AxisLabelElements overlaps the axis