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

Toggle Visibility on Line Series

5 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 13 Sep 2016, 08:38 PM

I have a Line Graph with 2 series.  One is the actual value and one is the target value so someone can easily see how far off their target they are.

I want to be able to toggle the visibility of the Target series with a Boolean parameter.  It would be similar to setting a binding.

When Parameter A is true, set visibility of series A to true.  When Parameter A is false, set visibility of parameter A to false.

I am having trouble finding where I can add a binding on the visibility of my line series.  Is this possible?

Thanks,

Phillip

5 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 14 Sep 2016, 10:04 AM
Hi Phillip,

The recommended approach is to apply a filter removing the records of SeriesA depending on the boolean report parameter - Filtering Data.

For example, check the attached TRDP file in the Standalone Report Designer of Telerik Reporting R3 2016. filters are applied in the Graph.SeriesGroups.Filters collection.


Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Phil
Top achievements
Rank 1
answered on 10 Oct 2016, 01:59 PM

Well the problem with that approach is that I have a table that shows the data as well.  If I filter the data so the line won't show on the graph, won't the data not show up in the table as well?

I was just looking for a way to set visibility on the line to false but still be able to see the data.  Is that not possible at this point?

0
Phil
Top achievements
Rank 1
answered on 10 Oct 2016, 03:36 PM
In the meantime, I have been looking at the filtering.  Since I have 3 series in one graph, Im not sure what syntax I should use for the filter if I only want to hide one of the series on the graph.  Could you provide an example syntax?  (Fields.Target = Fields.Target)  Or If this uses a boolean parameter (If Parameter.Visible = True)?
0
Accepted
Phil
Top achievements
Rank 1
answered on 10 Oct 2016, 04:24 PM

I actually think I figured this out.  In case anyone has the same problem:

I put conditional formatting on the series item and the datapoint item for that series.  I created a parameter called 'HideXXX'.  If this parameter is true, then the size of the line and datapoint are 0px and the color is clear.  This way, you can see through to any other series you have behind the hidden one.

Thanks,

Phillip

0
Stef
Telerik team
answered on 12 Oct 2016, 12:26 PM
Hello Philip,

Thank you for this update. Indeed series, data points, data point labels, series legend items have conditional formatting properties allowing you to use the graph's data to control the displayed content.

Rules can be based on fields, report parameters and other custom expressions.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Phil
Top achievements
Rank 1
Answers by
Stef
Telerik team
Phil
Top achievements
Rank 1
Share this question
or