Unplanned
Last Updated: 29 Mar 2016 10:45 by ADMIN
ADMIN
Dimitar
Created on: 15 May 2015 09:22
Category: ChartView
Type: Bug Report
0
FIX. RadChartView - incorrect layout when animation is performed.
To reproduce:
public RadForm1()
{
    InitializeComponent();

    LineSeries lineSeries = new LineSeries();
    lineSeries.DataPoints.Add(new CategoricalDataPoint(40, "Jan"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));
    lineSeries.ShowLabels = true;
    this.radChartView1.Series.Add(lineSeries);

    LineSeries lineSeries2 = new LineSeries();
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(13, "Jan"));
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr"));
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul"));
    lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct"));
    lineSeries2.ShowLabels = true;
    this.radChartView1.Series.Add(lineSeries2);

    ((CartesianArea)this.radChartView1.View.Area).ShowGrid = true;

    int i = 1;
    foreach (DataPointElement dpe in this.radChartView1.Series[0].Children)
    {
        dpe.IsVisible = false; AnimatedPropertySetting setting = new AnimatedPropertySetting();
        setting.StartValue = false;
        setting.EndValue = true;
        setting.Property = UIChartElement.IsVisibleProperty;
        setting.ApplyDelay = 40 + 40 * i;
        setting.NumFrames = 2;
        setting.ApplyValue(dpe); i++;
    }i = 1;
    foreach (DataPointElement dpe in this.radChartView1.Series[1].Children)
    {
        dpe.IsVisible = false; AnimatedPropertySetting setting = new AnimatedPropertySetting();
        setting.StartValue = false; setting.EndValue = true;
        setting.Property = UIChartElement.IsVisibleProperty;
        setting.ApplyDelay = 60 + 60 * i;
        setting.NumFrames = 2;
        setting.ApplyValue(dpe); i++;
    }
}

Workaround:
Perform the animation in the Shown event.
0 comments