Make Line Chart Labels Clickable to Toggle Series Visibility in Telerik Report Designer

2 Answers 18 Views
Designs, skins, themes Telerik Trainer
Prabesh
Top achievements
Rank 1
Iron
Iron
Prabesh asked on 12 May 2025, 05:07 AM | edited on 12 May 2025, 05:29 AM

 

Hi Telerik Team,

I’m designing a Telerik Report Designer report that includes a line chart with markers. I want to replicate a feature that exists in Kendo UI line charts, where:

  • Clicking on a legend item toggles (hides/shows) the corresponding series in the chart.

This is especially helpful when multiple lines are present, and users want to focus on specific data. Here’s an example screenshot of the chart I’m working with:

My questions:

  1. Does Telerik Reporting support interactive legend click behavior similar to Kendo UI Charts?

  2. If not directly supported, is there any workaround that can help achieve this functionality?

 

Regards,
Prabesh Shrestha

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Prabesh
Top achievements
Rank 1
Iron
Iron
answered on 20 May 2025, 08:08 AM | edited on 20 May 2025, 08:08 AM

Hi Dimitar,

I went ahead and implemented the approach using a JSON data source, and I'm happy to report that it’s working well with some additional tweaks. Here's a quick overview of what I did:

  • I created a multi-value report parameter named Line Series, with values coming from the available series in the chart (e.g., ABC, XYZ, etc.).

  • In the line chart, apply conditional formatting to each line series, but without an expression, only the rule as it is visible is enabled.
  • The Data Point Conditional Formatting for visibility uses the following expression for each line series:
    = IndexOfSubstr(Join(", ", Parameters.LineSeries.Value), "ABC") and set the Visible to true here.
  • Same for Legend Item for visibility uses the following expression for each line series:
    = IndexOfSubstr(Join(", ", Parameters.LineSeries.Value), "ABC") and set the Visible to False here.
  • For the Y-axis value, I used an expression like:
    = IIf(IndexOfSubstr(Join(", ", Parameters.LineSeries.Value), "ABC") >= 0, Sum(Fields.ABC), Null)

    This setup successfully hides the series and legend items based on user selections in the parameter dropdown, effectively mimicking the interactive toggle behavior found in Kendo UI Charts.

    Thanks again for pointing me in the right direction. This workaround is a solid alternative until native legend interactivity is supported.

Let me know if there’s anything you’d suggest improving in this setup!

Best regards,
Prabesh Shrestha

 

0
Dimitar
Telerik team
answered on 14 May 2025, 03:54 PM

Hello Prabesh,

Thank you for the screenshot and the additional information!

The graph's legend item does not support adding interactive actions to it, please feel free to add a feature request about this on the public portal -  Progress® Telerik® Reporting Feedback Portal.

Instead of using the legend item, I suggest creating a MultiValue report parameter - Adding Report Parameters Explained - Telerik Reporting, that contains the names of all series, and by names, I refer to the field using the graph series group's grouping field.

Then, you filter the graph so that only data that is part of the included series in the multivalue parameter is displayed. Thus, by changing the value of the parameter, the removed value will be filtered from the data of the graph, and that series will disappear.

For details on how to filter the graph, you can take a look at the Filtering the Graph Item At a Glance - Telerik Reporting article or at How to Create and Filter a Pie Chart - Telerik Reporting which is an example with a Pie chart but it could be helpful as well.

Please give this approach a try and let me know if you have any additional questions.

Regards,
Dimitar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Prabesh
Top achievements
Rank 1
Iron
Iron
commented on 16 May 2025, 08:14 AM

Hello Dimitar,

Thank you for your detailed response and the helpful links!

I will try the suggested approach of using a MultiValue report parameter that contains the names of all series, based on the graph series group's grouping field.

However, I’m a bit confused about how exactly this works in practice. Could you please provide a more detailed explanation or a simple demo/screenshot? That would help me understand the setup and filtering logic more clearly.

Looking forward to your guidance.

Best regards,
Prabesh

Tags
Designs, skins, themes Telerik Trainer
Asked by
Prabesh
Top achievements
Rank 1
Iron
Iron
Answers by
Prabesh
Top achievements
Rank 1
Iron
Iron
Dimitar
Telerik team
Share this question
or