How to use the same legend for multiple charts?

2 posts, 0 answers
  1. Anders
    Anders avatar
    80 posts
    Member since:
    Dec 2010

    Posted 17 Jan 2012 Link to this post

    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?


    Anders, Denmark
  2. Petar Marchev
    Petar Marchev avatar
    996 posts

    Posted 20 Jan 2012 Link to this post


    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.

    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top