This is a migrated thread and some comments may be shown as answers.

Click through

6 Answers 45 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Michael Hensen
Top achievements
Rank 1
Michael Hensen asked on 25 Oct 2012, 11:36 AM

'Can I' and then 'How can I' click through on a bar of a RadCatesianChart to get 'deeper' details on the bar value?

I found onseriesclicked in the docs but I cannot find where I can set this in xaml... :-(

 

 

 

6 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 25 Oct 2012, 02:22 PM
Hi, Michael

Thank you for contacting us!

If I understand you correctly your scenario is to display some additional information on a per Bar basis. In this case yes, you can get deeper details. This can be achieved by adding ChartTrackBallBehavior in the Chart and set its ShowInfo property to True. For better visualization you can set InfoMode="Multiple" and the information will be placed on the top of the bar. Here's the implementation: 

<telerik:RadCartesianChart.Behaviors>
    <telerik:ChartTrackBallBehavior ShowInfo="True"  InfoMode="Multiple" />
</telerik:RadCartesianChart.Behaviors>

I hope this information is useful. Let me know if I can assist you any further.

  

Kind regards,
Ivaylo Gergov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Michael Hensen
Top achievements
Rank 1
answered on 25 Oct 2012, 02:45 PM
Almost.. but not quite :-)

What I want is be able to click a bar and then popup a new chart with the details in a Pie chart so that you can see how the bar is build from.

For example it is a Bar that represents the value of Expenses on click or dblclick I want to popup a pie with the various groups of expenses to show the 'real' detail..

I hope this is possible :-)
0
Ivaylo Gergov
Telerik team
answered on 26 Oct 2012, 01:18 PM
Hi, Michael

Thank you for contacting us again.

Our charting component simply visualizes the passed data and does not provide built-in data operations like Grouping or Sorting. Hence the described scenario is custom for the component, however I have implemented specially for you a behavior which fits your scenario perfectly. When you click/tap on a DataPoint in the Bar Series - a new Area Series with detailed information about the selected DataPoint will open. To navigate back to the Bar Series click/tap on one of the DataPoints in the Area Series. Please, find the attached file with the project.

I believe this helps. If you have any further questions do not hesitate to contact us again.

 

Kind regards,
Ivaylo Gergov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Michael Hensen
Top achievements
Rank 1
answered on 26 Oct 2012, 01:28 PM
This is almost what I intended, but you have handed me the roadmap I can follow.. Excellent job!

Superb and thanks for your time! 
0
Mop
Top achievements
Rank 1
answered on 30 Oct 2012, 12:09 PM
Hi,

could You demonstrate how to do it not from code behind but with a binding?


<telerikChart:RadCartesianChart.Behaviors>
                <telerikChart:ChartSelectionBehavior DataPointSelectionMode="Single"
   SelectionChanged="OnDataPointSelectionChanged"/>
</telerikChart:RadCartesianChart.Behaviors>


Also how to change color of current selected item?

Edit: Done the color change (had telerik:BarSeries.DataPoints set up)

<telerik:RadCartesianChart.SelectionPalette>
                        <telerik:ChartPalette>
                            <telerik:ChartPalette.FillEntries>
                                <telerik:PaletteEntryCollection SeriesFamily="Bar">
                                    <SolidColorBrush Color="Red"/>
                                </telerik:PaletteEntryCollection>
                            </telerik:ChartPalette.FillEntries>
                        </telerik:ChartPalette>
                    </telerik:RadCartesianChart.SelectionPalette>
                    <telerik:RadCartesianChart.Palette>
                        <telerik:ChartPalette>
                            <telerik:ChartPalette.FillEntries>
                                <telerik:PaletteEntryCollection SeriesFamily="Bar">
                                    <SolidColorBrush Color="Yellow"/>
                                </telerik:PaletteEntryCollection>
                            </telerik:ChartPalette.FillEntries>
                            <telerik:ChartPalette.StrokeEntries>
                                <telerik:PaletteEntryCollection SeriesFamily="Bar">
                                    <SolidColorBrush Color="Black"/>
                                </telerik:PaletteEntryCollection>
                            </telerik:ChartPalette.StrokeEntries>
                        </telerik:ChartPalette>
</telerik:RadCartesianChart.Palette>
0
Georgi
Telerik team
answered on 02 Nov 2012, 12:57 PM
Hi Michael,

Thanks for getting back to us.

Currently the only possible way to receive the SelectionChanged event is from code behind. We will think of some way to extend the SelectionBehavior so that the respective IsSelected property in the ViewModel is updated together with the IsSelected property of the DataPoint itself.

I hope this information is useful. Do not hesitate to write us back should you have any other question/problem with our tools.


Regards,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart for XAML
Asked by
Michael Hensen
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Michael Hensen
Top achievements
Rank 1
Mop
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or