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

Compare Grouped Values

1 Answer 150 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
BVZ
Top achievements
Rank 1
BVZ asked on 12 May 2017, 09:25 AM

Hello,

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

Benjamin

 

 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 15 May 2017, 03:29 PM
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:
Expression:
= Fields.ser='ser2'
And
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.

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
Report Designer (standalone)
Asked by
BVZ
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or