when overlay a radlabel on a radchartview, chartview constantly refreshes label backcolor set to transparent tried to recreate this with a sample cs project but wouldn't reproduce! video has two instances of the same user control on the form notice that right hand instance does not update when radlabel is added attached is video of it working fine, then add label ontop , then see it misbehaving with fast refresh flicker! not only that it also prevents other items in the user controls from updating and the other user control on the form from updating have attached sample c# project (but cant reproduce)
Workaround: create a custom BarSeriesDrawPart and override the Draw method public class CustomBarSeriesDrawPart : BarSeriesDrawPart { public CustomBarSeriesDrawPart(BarSeries series, IChartRenderer renderer) : base(series, renderer) { } public override void Draw() { bool shouldDraw = IsElementValid(); if (shouldDraw) { Graphics graphics = this.Renderer.Surface as Graphics; GraphicsState state = graphics.Save(); Region clipRegion = graphics.Clip; CartesianSeries cartesianSeries = this.Element as CartesianSeries; if (cartesianSeries != null) { FieldInfo fi = cartesianSeries.GetType().GetField("area", BindingFlags.NonPublic | BindingFlags.Instance); CartesianArea area = fi.GetValue(cartesianSeries) as CartesianArea; MethodInfo mi = area.GetType().GetMethod("GetCartesianClipRect", BindingFlags.NonPublic | BindingFlags.Instance); mi.Invoke(area, null); RectangleF clipRect = (RectangleF)mi.Invoke(area, null); graphics.Clip = new Region(clipRect); } DrawSeriesParts(); graphics.Clip = clipRegion; graphics.Restore(state); } } }
Currently, when you zoom in and out, the position the mouse is initially hovering is not kept, while it should
How to reproduce: public Form1() { InitializeComponent(); DataTable source = new DataTable(); source.Columns.Add("PreviousGoal", typeof(decimal)); source.Columns.Add("CurrentCategory", typeof(System.DateTime)); source.LoadDataRow(new object[] { null, "6/1/15" }, true); source.LoadDataRow(new object[] { null, "6/2/15" }, true); source.LoadDataRow(new object[] { null, "6/3/15" }, true); source.LoadDataRow(new object[] { null, "6/4/15" }, true); source.LoadDataRow(new object[] { null, "6/5/15" }, true); this.radChartView1.DataSource = source; SteplineSeries previousGoalSeries = new SteplineSeries(); previousGoalSeries.DataSource = source; previousGoalSeries.ValueMember = "PreviousGoal"; this.radChartView1.Series.Add(previousGoalSeries); SteplineSeries previousGoalSeries1 = new SteplineSeries(); previousGoalSeries1.DataSource = source; previousGoalSeries1.ValueMember = "CurrentCategory"; this.radChartView1.Series.Add(previousGoalSeries1); this.radChartView1.ShowTrackBall = true; } Workaround: add the series with null values last public partial class Form1 : Form { public Form1() { InitializeComponent(); DataTable source = new DataTable(); source.Columns.Add("PreviousGoal", typeof(decimal)); source.Columns.Add("CurrentCategory", typeof(System.DateTime)); source.LoadDataRow(new object[] { null, "6/1/15" }, true); source.LoadDataRow(new object[] { null, "6/2/15" }, true); source.LoadDataRow(new object[] { null, "6/3/15" }, true); source.LoadDataRow(new object[] { null, "6/4/15" }, true); source.LoadDataRow(new object[] { null, "6/5/15" }, true); this.radChartView1.DataSource = source; SteplineSeries previousGoalSeries1 = new SteplineSeries(); previousGoalSeries1.DataSource = source; previousGoalSeries1.ValueMember = "CurrentCategory"; this.radChartView1.Series.Add(previousGoalSeries1); SteplineSeries previousGoalSeries = new SteplineSeries(); previousGoalSeries.DataSource = source; previousGoalSeries.ValueMember = "PreviousGoal"; this.radChartView1.Series.Add(previousGoalSeries); this.radChartView1.ShowTrackBall = true; } }
Telerik.Charting namespace exist in the WinForms and the WFP assemblies and one cannot reference both in a single project.
To reproduce: 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")); for (int i = 0; i < 50; i++) { series.DataPoints.Add(new PieDataPoint(1, "Item " + i)); } series.ShowLabels = true; series.DrawLinesToLabels = true; this.radChartView1.Series.Add(series); this.radChartView1.ShowSmartLabels = true;
To reproduce: public partial class Form1 : Form { private BindingList<MyData> data; public Form1() { InitializeComponent(); LoadDatas(); MyBarSeries bars = new MyBarSeries(); bars.DataSource = data; bars.ValueMember = "Montant"; bars.CategoryMember = "Month"; bars.LegendTitle = "My series of MyData"; this.radChartView1.ShowLegend = true; this.radChartView1.Series.Add(bars); } private void LoadDatas() { data = new BindingList<MyData>(); data.Add(new MyData(20, "janv", 1)); data.Add(new MyData(50, "fev", 2)); data.Add(new MyData(30, "mars", 3)); data.Add(new MyData(25, "avril", 4)); data.Add(new MyData(40, "mai", 5)); data.Add(new MyData(80, "juin", 6)); data.Add(new MyData(20, "juil", 7)); } public class MyData { public int Montant { get; set; } public string Month { get; set; } public double NumMonth { get; set; } public MyData(int montant, string month, double numMonth) { this.Montant = montant; this.Month = month; this.NumMonth = numMonth; } } public class MyBarSeries : BarSeries { } } Resolution: When you inherit from a serie, the original control themes are not automatically inherited. You need to override the ThemeRole property. Here is the code snippet: public class MyBarSeries : BarSeries { public override string ThemeRole { get { return typeof(BarSeries).Name; } } }
To reproduce: - Add a pie chart using the property builder and set the palette as well. Workaround - Set the palette in code: this.radChartView1.Area.View.Palette = KnownPalette.Metro;
To reproduce: 1. Add RadChartView with drill down and two RadCheckBox on the form 2. Subscribe to the ToggleStateChanged event of RadCheckBox and set the IsVisible property to true/false 3. In handler of DrillDown event set the series`s IsVisible property to be equal to checkbox`s Checked property 4. In few cases the series are not visible when changing the IsVisible property and view. Unfortunately due to the nature of the issue we cannot provide a workaround for it.
To reproduce: - Add three line series and only set their point size. - At runtime remove the second series. - The points color is not updated corectly. Workaround - Set colors in code like this: lineSerie1.BorderColor = Color.Red; lineSerie1.BackColor = Color.Red; lineSerie2.BackColor = Color.Green; lineSerie2.BorderColor = Color.Green; lineSerie3.BackColor = Color.Blue; lineSerie3.BorderColor = Color.Blue;
To reproduce: - Show the legend and the add remove series at runtime. - The legend items must not have text.
To reproduce: public RadForm1() { InitializeComponent(); date = DateTime.Now; } int dayCounter; Random rnd = new Random(); DateTime date; Timer timer = new Timer(); protected override void OnLoad(EventArgs e) { base.OnLoad(e); LineSeries lineSeria = new LineSeries(); DateTimeContinuousAxis continuousAxis = new DateTimeContinuousAxis(); continuousAxis.LabelFormat = "{0:dd}"; lineSeria.HorizontalAxis = continuousAxis; radChartView1.Series.Add(lineSeria); for (int i = 0; i < 500; i++) { radChartView1.Series[0].DataPoints.Add(new CategoricalDataPoint(rnd.Next(1000), date.AddDays(dayCounter++))); } timer.Tick += timer_Tick; timer.Interval = 200; timer.Start(); } void timer_Tick(object sender, EventArgs e) { foreach (CategoricalDataPoint point in radChartView1.Series[0].DataPoints) { // point.Value = rnd.Next(1000); point.Category = date.AddDays(dayCounter++); } } Workaround: void timer_Tick(object sender, EventArgs e) { DateTimeContinuousAxis continuousAxis = ((LineSeries)radChartView1.Series[0]).HorizontalAxis as DateTimeContinuousAxis; HybridDictionary hashSet = typeof(Axis).GetField("hashSet", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(continuousAxis) as HybridDictionary; hashSet.Clear(); }
To reproduce: - Set the palette from the default context menu. - Try to get the palette name. Workaround: class MyChartDataPointElementController : ChartDataPointElementController { protected override RadContextMenu CreatePaletteMenu() { //return base.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); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteAutumn)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteCold)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteFlower)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteForest)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteGrayscale)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteGround)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteLilac)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteMetro)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteNatural)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PalettePastel)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteRainbow)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteSpring)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteSummer)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteWarm)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteWindows8)); item.Click += new System.EventHandler(item_Click); paletteItem.Items.Add(item); item = new RadMenuItem(localizationProvider.GetLocalizedString(RadChartStringId.PaletteSun)); item.Click += new System.EventHandler(item_Click); 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.Text); this.Area.View.Palette.Name = item.Text; } } } Change the controller like this: radChartView1.Controllers.Add(new MyChartDataPointElementController());