Compare Grouped Values

2 posts, 0 answers
  1. BVZ
    BVZ avatar
    5 posts
    Member since:
    Feb 2017

    Posted 12 May 2017 Link to this post


    I have one series in column chart that is grouped by a certain field, so i get two columns per x-axis tick.

    Now what i would like to do is to set the background of the second column to green if its column value is less than the value of the first colum. And to set the background to red if it is greater than the first column's value.


    Is this possible in standalone designer?


    See attached Image


    Best regards




  2. Stef
    Stef avatar
    3610 posts

    Posted 15 May 2017 Link to this post

    Hello Benjamine,

    You can use the Series.DataPointConditionalFormatting to change colors based on data. For example check the attached demo report in the Standalone Report Designer of Telerik Reporting R2 2017.

    There is a conditional formatting with the following rule based on data and the Exec data function that evaluates the expression in a specific scope:
    = Fields.ser='ser2'
    Exec('catGroup',Sum(IIf(Fields.ser='ser1',Fields.val,0))) > Exec('catGroup',Sum(IIf(Fields.ser='ser2',Fields.val,0)))
    Operator: =
    Value: =True
    'catGroup' is the name of the CategoryGroup of the series, the one that defines slots on the X axis.

    Please note that this may lead to ambiguity due to the colors used in the legend. There is conditional formatting on Series.LegendItem.MarkerConditionalFormatting, but bars can still be colored differently.

    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