Hello Smartpcr,
The current BETA version supports multiple item selection only -- we will be extending the ChartSelectionBehavior with series selection and the ability to specify single item/series selection for the Q1 2012 official release.
Here is a sample code snippet that demonstrates how you can enable the chart selection:
- Add ChartSelectionBehavior instance to the RadCartesianChart.Behaviors collection.
- Define the desired selection color via custom ChartPalette and set it to the RadCartesianChart.SelectionPalette property.
- You can detect the selection actopn via the RadCartesianChart.SelectionChanged event.
<
telerik:RadCartesianChart
x:Name
=
"RadChart1"
Palette
=
"Metro"
SelectionChanged
=
"RadChart1_SelectionChanged"
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartSelectionBehavior
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:RadCartesianChart.SelectionPalette
>
<
telerik:ChartPalette
>
<
telerik:ChartPalette.GlobalEntries
>
<
telerik:PaletteEntry
Fill
=
"Red"
/>
</
telerik:ChartPalette.GlobalEntries
>
</
telerik:ChartPalette
>
</
telerik:RadCartesianChart.SelectionPalette
>
<
telerik:BarSeries
>
<
telerik:CategoricalDataPoint
Value
=
"1"
/>
<
telerik:CategoricalDataPoint
Value
=
"2"
/>
<
telerik:CategoricalDataPoint
Value
=
"6"
/>
<
telerik:CategoricalDataPoint
Value
=
"7"
/>
</
telerik:BarSeries
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:CategoricalAxis
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"Y"
/>
</
telerik:RadCartesianChart.Grid
>
</
telerik:RadCartesianChart
>
All the best,
Giuseppe
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>