Toggle Visibility on Line Series

6 posts, 1 answers
  1. Phil
    Phil avatar
    29 posts
    Member since:
    Mar 2015

    Posted 13 Sep Link to this post

    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

  2. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 14 Sep Link to this post

    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
  3. DevCraft banner
  4. Phil
    Phil avatar
    29 posts
    Member since:
    Mar 2015

    Posted 10 Oct Link to this post

    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?

  5. Phil
    Phil avatar
    29 posts
    Member since:
    Mar 2015

    Posted 10 Oct Link to this post

    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)?
  6. Answer
    Phil
    Phil avatar
    29 posts
    Member since:
    Mar 2015

    Posted 10 Oct Link to this post

    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

  7. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 12 Oct Link to this post

    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
Back to Top
DevCraft banner