Hi!
I've noticed that the PointMarkItemStyle's binding is ignored when the data is sampled, which is in a way expected.
I have a series with data values that have two states: real and estimate, defined by the Model's IsEstimated value.
I've set the PointMarkItemStyle to:
<
Style
x:Key
=
"InterpolatedPointMarkStyle"
TargetType
=
"telerik:PointMark"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerik:PointMark"
>
<
Canvas
>
<
Path
x:Name
=
"PART_PointMarkPath"
Canvas.Left
=
"{Binding DataItem.PointMarkMargin}"
Canvas.Top
=
"{Binding DataItem.PointMarkMargin}"
Style
=
"{TemplateBinding ShapeStyle}"
Width
=
"{Binding DataItem.PointMarkSize}"
Height
=
"{Binding DataItem.PointMarkSize}"
Opacity
=
"{Binding DataItem.PointMarkOpacity}"
Stretch
=
"Fill"
>
<
Path.Data
>
<
PathGeometry
x:Name
=
"PART_PointMarkPathGeometry"
/>
</
Path.Data
>
</
Path
>
</
Canvas
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
Note that I'm using the PointMarkSize, PointMarkMargin, PointMarkOpacity to define the visual representation of the data.
If the value is estimated (IsEstimated == true), the point is somewhat smaller and its opacity is set to 0.7.
However, the chart was completely ignoring my binding (showing no points at all), as seen on the first image (style ignored.png).
Then I realized that I have about 140 points, and the Chart's Sampling was set to 50 points. Upon setting the Sampling to 200 (or any number of points larger than my number of points), the chart's sampling automatically turned off and PointMarkItemStyle was applied. (Style Applied.png).
I am aware that when sampling takes place, several points may be grouped into one, making it impossible to trivially determine whether the new point satisfies the conditions the individual points did. But is there any way to make data points (in sampled series) still apply the style, where a data point would be set to Estimated if ANY of the underlying points in the group are Estimated?
If not, what would be the way to find out whether a specific series is currently sampled?