This question is locked. New answers and comments are not allowed.
Hi, How can I set a PointTemplate to chart series, series are defined using SeriesDescriptor.
My goal is to show tooltips in each point of the series
I have tried the following but is not working
Thanks for your help.
My goal is to show tooltips in each point of the series
I have tried the following but is not working
Thanks for your help.
<
Grid.Resources
>
<
DataTemplate
x:Key
=
"PointDataTemplate"
>
<
Ellipse
Width
=
"6"
Height
=
"6"
/>
</
DataTemplate
>
</
Grid.Resources
>
<
telerik:RadCartesianChart
x:Name
=
"MonitoringParameterChart"
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTooltipBehavior
HorizontalOffset
=
"-17"
VerticalOffset
=
"-70"
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:RadCartesianChart.TooltipTemplate
>
<
DataTemplate
>
<
Grid
>
<
Path
Data
=
"M-1236,-441 L-1208,-441 L-1208,-424 L-1228,-424 L-1230.5,-420 L-1233,-424 L-1236,-424 z"
Stretch
=
"Fill"
Fill
=
"#FFFFFFFF"
Stroke
=
"#FF767676"
StrokeThickness
=
"1"
/>
<
TextBlock
Margin
=
"6,4,6,10"
FontSize
=
"11"
>
<
Run
Text
=
"{Binding Value, StringFormat=\{0:#########\}}"
/>
<
LineBreak
/>
<
Run
Text
=
"{Binding Category, StringFormat=\{0:dd MMM yyyy\}}"
/>
</
TextBlock
>
</
Grid
>
</
DataTemplate
>
</
telerik:RadCartesianChart.TooltipTemplate
>
<
telerik:RadCartesianChart.SeriesProvider
>
<
telerik:ChartSeriesProvider
x:Name
=
"MonitoringParametersSeriesProvider"
Source
=
"{Binding}"
>
<
telerik:ChartSeriesProvider.SeriesDescriptors
>
<
telerik:CategoricalSeriesDescriptor
ItemsSourcePath
=
"Values"
ValuePath
=
"Value"
CategoryPath
=
"Time"
>
<
telerik:CategoricalSeriesDescriptor.Style
>
<
Style
TargetType
=
"telerik:LineSeries"
>
<
Setter
Property
=
"StrokeThickness"
Value
=
"1"
/>
<
Setter
Property
=
"PointTemplate"
Value
=
"{StaticResource PointDataTemplate}"
/>
</
Style
>
</
telerik:CategoricalSeriesDescriptor.Style
>
</
telerik:CategoricalSeriesDescriptor
>
</
telerik:ChartSeriesProvider.SeriesDescriptors
>
</
telerik:ChartSeriesProvider
>
</
telerik:RadCartesianChart.SeriesProvider
>
</
telerik:RadCartesianChart
>