The chart in my app performs relatively well with exception to one odd behavior.
First, I am creating a point series manually. I say manually meaning I am creating it point by point. I do this using a PointTemplate so I can control the color of each point in the series. The retrieval of data and the creation of each point in the series happens pretty quickly. Less than 80 milliseconds on average.
Also on the window is a grid where when selecting a row the point series is drawn in the chart. Clicking another row removes the previous point series and creates a new one.
If I start by clicking the first row and then hold down the down arrow, it draws the first 4 to 5 rows with ease and then seems to pause. When it finally unpauses, it has "skipped" about 10 to 12 rows and from then on never pauses again. I have verified in code that the data for the "skipped" rows is being loaded. They series just aren't being rendered.
A few observations:
First, I am creating a point series manually. I say manually meaning I am creating it point by point. I do this using a PointTemplate so I can control the color of each point in the series. The retrieval of data and the creation of each point in the series happens pretty quickly. Less than 80 milliseconds on average.
Also on the window is a grid where when selecting a row the point series is drawn in the chart. Clicking another row removes the previous point series and creates a new one.
If I start by clicking the first row and then hold down the down arrow, it draws the first 4 to 5 rows with ease and then seems to pause. When it finally unpauses, it has "skipped" about 10 to 12 rows and from then on never pauses again. I have verified in code that the data for the "skipped" rows is being loaded. They series just aren't being rendered.
A few observations:
- When the chart is very small I do not experience this. When the chart is larger I do.
- As I said, after the pause, it continues and then never pause again. However if I move in the opposite direction in the grid it does pause. But again after the pause it does not do it again. Then going in the opposite direction again it does the same thing.
I have tried all the different RenderOptions available. I have also tried the RenderMode setter which is obsolete. I have also tried not using a PointTemplate.
Are there other tweaks that can be done to resolve this?
<
telerik:RadCartesianChart
Name
=
"Chart"
Grid.Column
=
"0"
>
<
telerik:RadCartesianChart.Resources
>
<
DataTemplate
x:Key
=
"PointSeriesTemplate"
>
<
Ellipse
Fill
=
"{Binding DataItem.Color, Converter={StaticResource ColorToBrushConverter}}"
Width
=
"3"
Height
=
"3"
/>
</
DataTemplate
>
</
telerik:RadCartesianChart.Resources
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartPanAndZoomBehavior
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
DateTimeComponent
=
"Minute"
LabelFitMode
=
"MultiLine"
LabelFormat
=
"H:mm"
LineThickness
=
"1"
MajorTickInterval
=
"60"
MajorTickLength
=
"5"
TickThickness
=
"1"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
LineThickness
=
"1"
MajorTickLength
=
"5"
TickThickness
=
"1"
Title
=
"Percent Change"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"XY"
/>
</
telerik:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.SeriesProvider
>
<
telerik:ChartSeriesProvider
Source
=
"{Binding ChartData}"
>
<
telerik:ChartSeriesProvider.SeriesDescriptors
>
<
telerik:CategoricalSeriesDescriptor
ItemsSourcePath
=
"ChartItems"
ValuePath
=
"YValue"
CategoryPath
=
"XValue"
>
<
telerik:CategoricalSeriesDescriptor.Style
>
<
Style
TargetType
=
"telerik:PointSeries"
>
<
Setter
Property
=
"PointTemplate"
Value
=
"{StaticResource PointSeriesTemplate}"
/>
<
Setter
Property
=
"RenderOptions"
>
<
Setter.Value
>
<
telerik:BitmapRenderOptions
/>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:CategoricalSeriesDescriptor.Style
>
</
telerik:CategoricalSeriesDescriptor
>
</
telerik:ChartSeriesProvider.SeriesDescriptors
>
</
telerik:ChartSeriesProvider
>
</
telerik:RadCartesianChart.SeriesProvider
>
</
telerik:RadCartesianChart
>