This is a migrated thread and some comments may be shown as answers.

Yvalue does not show on the graph after rebind

1 Answer 22 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 16 May 2012, 09:26 PM
Hi Guys,

I am using wpf to create a live data reporting software. I used the radchart control to show the live line graph. Following is the example code:
xaml code:

<chart:RadChart x:Name="chart1" AxisElementBrush="#FFD43636">

<chart:RadChart.SeriesMappings>

<charting:SeriesMapping LegendLabel="Value">

<charting:SeriesMapping.SeriesDefinition>

<charting:LineSeriesDefinition ShowItemLabels="False"></charting:LineSeriesDefinition>

</charting:SeriesMapping.SeriesDefinition>

<charting:ItemMapping FieldName="index" DataPointMember="XValue"></charting:ItemMapping>

 <charting:ItemMapping FieldName="value" DataPointMember="YValue"></charting:ItemMapping>

 </charting:SeriesMapping>

 </chart:RadChart.SeriesMappings>

 </chart:RadChart>
Code_behind is:

List<indexsandnumbers> data = new List<indexandnumbers>();
for (int i = 1; i < 999999; i++)

{
   index = i;
   value = i*1.3;
   data.add(new indexsandnumbers(index,value));

   chart1.Itemsource = data;
   chart1.rebind();
}

However, I can only see the Xvalue increase and there is no Yvalue in the chart1 after I run the application.

The only way to show the line chart is I stop the loop, I can not get the line chart during the loop.

Any helps is appreciated.


Thank you very much.

1 Answer, 1 is accepted

Sort by
0
Rosko
Telerik team
answered on 21 May 2012, 08:50 AM
Hi Michael,

Have you seen the online demos regarding the live performance of RadChart?

All the best,
Rosko
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Michael
Top achievements
Rank 1
Answers by
Rosko
Telerik team
Share this question
or