Completed
Last Updated: 11 Jul 2016 13:18 by ADMIN
ADMIN
Dimitar
Created on: 13 Nov 2015 09:04
Category: ChartView
Type: Bug Report
1
FIX. RadChartView - exception when the track ball is enabled and the data source is changed with a timer.
To reproduce:
- Enable the Trackball
- Use the following code:
public RadForm1()
{
    InitializeComponent();

    ScatterLineSeries sls = radChartView1.Series[0] as ScatterLineSeries;
    sls.XValueMember = "X";
    sls.YValueMember = "Y";
}

private void timer1_Tick(object sender, EventArgs e)
{
    DataTable dt = new DataTable();
    dt.Columns.Add("X", typeof(double));
    dt.Columns.Add("Y", typeof(double));

    Random ran = new Random();
    for (int i = 0; i < 100; i++)
        dt.Rows.Add(i, 1 + ran.NextDouble() / 10);

    radChartView1.Series[0].DataSource = dt;
}

Workaround:
class MyChartTrackballController : ChartTrackballController
{
    protected override string GetPointText(DataPoint point)
    {
        ChartSeries series = point.Presenter as ChartSeries;
        if (series == null)
        {
            return string.Empty;
        }
        return base.GetPointText(point);
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments