QPR ProcessAnalyzer Table: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 61: | Line 61: | ||
</pre> | </pre> | ||
The following setting defined a fixed color for the column. | |||
<pre> | <pre> | ||
{ | |||
"backgroundColor": { | "backgroundColor": { | ||
"color": "#FFD851" | "color": "#FFD851" | ||
Line 70: | Line 71: | ||
<pre> | <pre> | ||
{ | |||
"textColor": { | "textColor": { | ||
"rules": [ | "rules": [ | ||
{ | |||
"color": "#FF0000", | |||
"limit": 20, | |||
"comparison": "<=" | |||
}, | |||
{ | |||
"color": "#00FF00" | |||
} | |||
] | |||
} | } | ||
} | } | ||
Line 87: | Line 88: | ||
<pre> | <pre> | ||
{ | |||
"icon": { | "icon": { | ||
"rules": [ | "rules": [ | ||
Line 113: | Line 114: | ||
<pre> | <pre> | ||
{ | |||
"databar": { | "databar": { | ||
"min": 0, | "min": 0, |
Revision as of 19:05, 21 June 2020
Table conditional formatting is defined as a JSON object with following properties:
- backgroundColor
- textColor
- rules: rules are check in their order and the first matching determines the color.
- color
- limit
- comparison: <, >, <=, >=, ==, !=
- scales
Example: Background color is based on the following rules:
- if value is lower or equal to 5, background color is #FF0000
- if value is between, 5 and 10, background color is #FFFF00
- if value is greated than 10, background color is #00FF00
{ "backgroundColor": { "rules": [ { "color": "#FF0000", "limit": 5, "comparison": "<=" }, { "color": "#FFFF00", "limit": 10, "comparison": "<=" }, { "color": "#00FF00", "limit": 50, "comparison": ">" } ] } }
Example: Background color is based on a color scale where column minimum value gets color #FFFFFF and maximum value #FFD851. Color is scaled linearly between these colors.
{ "backgroundColor": { "scale": [ [{ "aggregate": "min" }, "#FFFFFF"], [{ "aggregate": "max" }, "#FFD851"] ] } }
Example: Similar to previous example, except minimum and maximum values come from another column (measure number 1).
{ "backgroundColor": { "scale": [ [{ "type":"measure", "index": 1, "aggregate": "min" }, "#FFFFFF"], [{ "type":"measure", "index": 1, "aggregate": "max" }, "#FFD851"] ] } }
The following setting defined a fixed color for the column.
{ "backgroundColor": { "color": "#FFD851" } }
{ "textColor": { "rules": [ { "color": "#FF0000", "limit": 20, "comparison": "<=" }, { "color": "#00FF00" } ] } }
{ "icon": { "rules": [ { "icon": "star", "limit": 100, "comparison": ">" } ] }, "iconColor": { "rules": [ { "color": "#00FF00", "limit": 500, "comparison": ">" }, { "color": "#FF0000" } ] } }
{ "databar": { "min": 0, "max": { "type":"dimension", "index": 1, "aggregate": "min" } "direction": "right" } }