Completed
Last Updated: 25 May 2017 13:24 by ADMIN
ADMIN
Hristo
Created on: 05 Apr 2017 13:06
Category: ChartView
Type: Bug Report
2
FIX. RadRangeSelector - series border color is not synced with the border color of the associated series if it is explicitly set
How to reproduce: explicitly set the border color of the series

Workaround:
public partial class Form1 : Form
{
    private RangeSelectorViewElement chartElement;

    public Form1()
    {
        InitializeComponent();

        LineSeries lineSeries = new LineSeries();
        lineSeries.Name = "Line";
        lineSeries.BorderColor = Color.Green;
        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);

        this.chartElement = this.radRangeSelector1.RangeSelectorElement.AssociatedElement as RangeSelectorViewElement;
        this.chartElement.SeriesInitialized += ChartElement_SeriesInitialized;
    }

    private void ChartElement_SeriesInitialized(object sender, SeriesInitializedEventArgs e)
    {
        if (e.Series.Name == "Line")
        {
            e.Series.BorderColor = this.radChartView1.Series.Where(s => s.Name == "Line").First().BorderColor;
        }
    }
}
0 comments