Hi,
I have a chart which displays 4 lineseries. I bind it to a ChartEntities, using MVVM, which is an AddRangeObservableCollection<T> as proposed in performance tips and tricks. This did wonder when data came from the server the first time, using AddRange, taking 1-5 seconds displaying all the data. However when i try to populate the dataset with a new result a second time, the chart component freezes for 15-20 seconds, before it displays the result. It seemed to be the clearing before AddRange was called that was the problem.
To test this out, i created a button which only job was to clear the ChartEntities list (not fill it afterwards). And it confirmed my suspicion, that the clearing makes the chart freeze.
My dataset range from 40-200 elements, and the problem is not so clear in the button half. 40 elements only takes like 2 second to clear, but with 192 elements the chart takes 12-13 seconds to just clear the elements from the ChartEntities list, and this does not even include creating the new chart which should be displayed, adding at least 1-5 seconds. While clearing the list, the whole Silverlight application freezes, and nothing can be done.
We have a release which testing is starting on Monday, meaning i have to figure this out before then, or just remove this view, so it is quite urgent. Is there anything that can be done?
I have a chart which displays 4 lineseries. I bind it to a ChartEntities, using MVVM, which is an AddRangeObservableCollection<T> as proposed in performance tips and tricks. This did wonder when data came from the server the first time, using AddRange, taking 1-5 seconds displaying all the data. However when i try to populate the dataset with a new result a second time, the chart component freezes for 15-20 seconds, before it displays the result. It seemed to be the clearing before AddRange was called that was the problem.
To test this out, i created a button which only job was to clear the ChartEntities list (not fill it afterwards). And it confirmed my suspicion, that the clearing makes the chart freeze.
My dataset range from 40-200 elements, and the problem is not so clear in the button half. 40 elements only takes like 2 second to clear, but with 192 elements the chart takes 12-13 seconds to just clear the elements from the ChartEntities list, and this does not even include creating the new chart which should be displayed, adding at least 1-5 seconds. While clearing the list, the whole Silverlight application freezes, and nothing can be done.
We have a release which testing is starting on Monday, meaning i have to figure this out before then, or just remove this view, so it is quite urgent. Is there anything that can be done?
<
telerikChart:RadChart
ItemsSource
=
"{Binding ChartEntities}"
x:Name
=
"radChart2"
Grid.Column
=
"0"
Grid.Row
=
"1"
Margin
=
"15"
Grid.ColumnSpan
=
"2"
>
<
telerikChart:RadChart.DefaultView
>
<
charting:ChartDefaultView
>
<
charting:ChartDefaultView.ChartLegend
>
<
charting:ChartLegend
x:Name
=
"chartLegend"
Header
=
"Time"
UseAutoGeneratedItems
=
"True"
/>
</
charting:ChartDefaultView.ChartLegend
>
<
charting:ChartDefaultView.ChartArea
>
<
charting:ChartArea
x:Name
=
"chartMain"
LegendName
=
"chartLegend"
EnableAnimations
=
"False"
EnableStripLinesAnimation
=
"False"
>
<
charting:ChartArea.AxisX
>
<
charting:AxisX
LabelRotationAngle
=
"90"
Title
=
"Benchmark sections"
>
</
charting:AxisX
>
</
charting:ChartArea.AxisX
>
<
charting:ChartArea.AxisY
>
<
charting:AxisY
Title
=
"Accumulated days"
>
</
charting:AxisY
>
</
charting:ChartArea.AxisY
>
</
charting:ChartArea
>
</
charting:ChartDefaultView.ChartArea
>
</
charting:ChartDefaultView
>
</
telerikChart:RadChart.DefaultView
>
<
telerikChart:RadChart.SeriesMappings
>
<
charting:SeriesMapping
ChartAreaName
=
"chartMain"
LegendLabel
=
"Budget"
>
<
charting:SeriesMapping.SeriesDefinition
>
<
charting:LineSeriesDefinition
ShowPointMarks
=
"False"
ShowItemLabels
=
"False"
ShowItemToolTips
=
"False"
/>
</
charting:SeriesMapping.SeriesDefinition
>
<
charting:SeriesMapping.ItemMappings
>
<
charting:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"XValue"
/>
<
charting:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"BudgetTimeTotal"
/>
</
charting:SeriesMapping.ItemMappings
>
</
charting:SeriesMapping
>
<
charting:SeriesMapping
ChartAreaName
=
"chartMain"
LegendLabel
=
"Actual"
>
<
charting:SeriesMapping.SeriesDefinition
>
<
charting:LineSeriesDefinition
ShowPointMarks
=
"False"
ShowItemLabels
=
"False"
ShowItemToolTips
=
"False"
/>
</
charting:SeriesMapping.SeriesDefinition
>
<
charting:SeriesMapping.ItemMappings
>
<
charting:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"XValue"
/>
<
charting:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"ActualTimeTotal"
/>
</
charting:SeriesMapping.ItemMappings
>
</
charting:SeriesMapping
>
<
charting:SeriesMapping
ChartAreaName
=
"chartMain"
LegendLabel
=
"Planned"
>
<
charting:SeriesMapping.SeriesDefinition
>
<
charting:LineSeriesDefinition
ShowPointMarks
=
"False"
ShowItemLabels
=
"False"
ShowItemToolTips
=
"False"
/>
</
charting:SeriesMapping.SeriesDefinition
>
<
charting:SeriesMapping.ItemMappings
>
<
charting:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"XValue"
/>
<
charting:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"PlanTimeTotal"
/>
</
charting:SeriesMapping.ItemMappings
>
</
charting:SeriesMapping
>
<
charting:SeriesMapping
ChartAreaName
=
"chartMain"
LegendLabel
=
"Tech.Limit"
>
<
charting:SeriesMapping.SeriesDefinition
>
<
charting:LineSeriesDefinition
ShowPointMarks
=
"False"
ShowItemLabels
=
"False"
ShowItemToolTips
=
"False"
/>
</
charting:SeriesMapping.SeriesDefinition
>
<
charting:SeriesMapping.ItemMappings
>
<
charting:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"XValue"
/>
<
charting:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"OptimalTimeTotal"
/>
</
charting:SeriesMapping.ItemMappings
>
</
charting:SeriesMapping
>
</
telerikChart:RadChart.SeriesMappings
>
</
telerikChart:RadChart
>