Hide Series at runtime

3 posts, 1 answers
  1. Brent Hetland
    Brent Hetland avatar
    61 posts
    Member since:
    Aug 2009

    Posted 24 Jun 2015 Link to this post


    I am using Q2 2014 SP1 of Telerik Reporting.  My report currently contains a single Graph in the detail section.  It has a barSeries and two lineSeries.

    However, there are times when I only want to show one of the two line series.

    I'm binding the graph to a strongly typed list of objects and the object has a property on it that will let me determine if I want to hide the line series.


    My specific example is this:

    I am already binding my report's DataSource property to ReportItem.DataObject.BowlerValues  (this is my strongly typed list).

    My graph might need to show Planned (bar), Forecast (line) and Actual (line) values.

    A BowlerValue object has a property on it called "ShowForecast".

    If ShowForecast is false, I will want to hide the Forecast Line Series.


    How can I do this?  Can I use Bindings in any way?


  2. Answer
    Nasko avatar
    1045 posts

    Posted 29 Jun 2015 Link to this post

    Hello Brent,

    You can hide Graph series using one of the following approaches:

    • Use the Series.ConditionalFormatting property to set a conditional formatting rule for the current series which sets its visibility;

    • Use the SeriesGroup.Filters property to apply a filter to some of the series;

    • Create the Graph definition programmatically based on the value of the ShowForecast property;

    • Create two separate Graph items using the report designer and change their visibility based on the ShowForecast property;

    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. Brent Hetland
    Brent Hetland avatar
    61 posts
    Member since:
    Aug 2009

    Posted 29 Jun 2015 in reply to Nasko Link to this post

    Hi Nasko,

    Thanks.  While you did list some options and presented some links, you gave no real technical detail...

    After I submitted the forum post, I went down the road of creating a duplicate graph which is your 4th bullet.  But you give absolutely no indication of how to do it.  I'm fairly new to Telerik Reporting, but I knew I could create a Binding that referenced my ShowForecast Field, and have it control the Visible property of the Graph.

    Thanks again for the reply.  I'd encourage you next time, to give more detail.


Back to Top