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

How to use the same legend for multiple charts?

1 Answer 22 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Anders
Top achievements
Rank 1
Anders asked on 17 Jan 2012, 02:46 PM
Hi telerik,

I wish to abuse the chart.
Since ChartLegend is a separate object referenced by the RadChart, I thought I could re-use the legend object to obtain a single legend for several RadCharts. This way I wanted to achieve the interactivity effects of hovering over graphs / legends and seeing the highlight in the other.

My starting point was four charts, where the first three were real plots (with hidden legend) where as the last was a RadChart with hidden ChartArea. That worked well, but with no interactivity.

If I create the ChartLegend object first and reference it from the remaining three RadCharts, I do get the legend headers in the ChartLegend, but still no interactivity.

Is this even possible? Or should I just 'accept' the separation and 'manually' handle the highlighting? Can you send me in a direction where I might get lucky?

Thanks,

Anders, Denmark

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 20 Jan 2012, 09:07 AM
Hi,

Unfortunately automatic synchronization of hovering, in the scenario you described, is not possible. You can, however, achieve such a behavior manually. I have attached a sample project that demonstrates the approach and it can help you accomplish your task.

Hope this helps. 

Note: Attached is a Silverlight project but the approach and code is applicable for WPF.

Greetings,
Petar Marchev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Anders
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or