QPR ProcessAnalyzer Table: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Table conditional formatting is defined as a JSON object with following allowed properties:
Table conditional formatting can be used to define table cell background colors, text colors, colored icons and databar, where all depend on the data in the table.
* backgroundColor / textColor / iconColor / databarColor
 
Conditional formatting is defined in the measure/dimension/column settings as a JSON object with following allowed properties:
* backgroundColor
** rules
** rules
** scale
** scale
** color: To define a fixed color.
** color: To define a fixed color.
* textColor
* databar
* databar
** min
** min
Line 14: Line 17:
* rules: rules are check in their order and the first matching determines the color.
* rules: rules are check in their order and the first matching determines the color.
** color
** color
** limit
** value
** comparison: <, >, <=, >=, ==, !=
** comparison: <, >, <=, >=, ==, !=
* scale
* scale
Line 30: Line 33:
{
{
"color": "#FF0000",
"color": "#FF0000",
"limit": 5,
"value": 5,
"comparison": "<="
"comparison": "<="
},
},
{
{
"color": "#FFFF00",
"color": "#FFFF00",
"limit": 10,
"value": 10,
"comparison": "<="
"comparison": "<="
},
},
Line 106: Line 109:
{
{
"color": "#FF0000",
"color": "#FF0000",
"limit": 20,
"value": 20,
"comparison": "<="
"comparison": "<="
},
},
Line 123: Line 126:
{
{
"icon": "sentiment_satisfied_alt",
"icon": "sentiment_satisfied_alt",
"limit": 100,
"value": 100,
"comparison": ">"
"comparison": ">"
}
}
Line 133: Line 136:
{
{
"color": "#36d475",
"color": "#36d475",
"limit": 100,
"value": 100,
"comparison": ">"
"comparison": ">"
},
},

Revision as of 15:55, 24 June 2020

Table conditional formatting can be used to define table cell background colors, text colors, colored icons and databar, where all depend on the data in the table.

Conditional formatting is defined in the measure/dimension/column settings as a JSON object with following allowed properties:

  • backgroundColor
    • rules
    • scale
    • color: To define a fixed color.
  • textColor
  • databar
    • min
    • max
    • color
  • icon
    • rules
    • color
  • rules: rules are check in their order and the first matching determines the color.
    • color
    • value
    • comparison: <, >, <=, >=, ==, !=
  • scale
    • color
    • value

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",
				"value": 5,
				"comparison": "<="
			},
			{
				"color": "#FFFF00",
				"value": 10,
				"comparison": "<="
			},
			{
				"color": "#00FF00"
			}
		]
	}
}

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": [
			{
				"value": { "aggregate": "min" },
				"color": "#FFFFFF"
			},
			{
				"value": { "aggregate": "max" },
				"color": "#FFD851"
			}
		]
	}
}

Example: Similar to previous example, except minimum and maximum values come from another column (measure number 1).

{
	"backgroundColor": {
		"scale": [
			{
				"value": { "type":"measure", "index": 1, "aggregate": "min" },
				"color": "#FFFFFF"
			},
			{
				"value": { "type":"measure", "index": 1, "aggregate": "max" },
				"color": "#FFD851"
			}
		]
	}
}

The following setting defined a fixed color for the column.

{
	"backgroundColor": {
		"color": "#FFD851"
	}
}
{
	"backgroundColor": {
		"color": { "type":"measure", "index": 1 }
	}
}

Rules are applied to the text color.

{
	"textColor": {
		"rules": [
			{
				"color": "#FF0000",
				"value": 20,
				"comparison": "<="
			},
			{
				"color": "#00FF00"
			}
		]
	}
}
{
	"icon": {
		"rules": [
			{
				"icon": "sentiment_satisfied_alt",
				"value": 100,
				"comparison": ">"
			}
			]
			"icon": "sentiment_very_dissatisfied"
		],
		"color": {
			"rules": [
				{
					"color": "#36d475",
					"value": 100,
					"comparison": ">"
				},
				{
					"color": "#EF5254"
				}
			]
		}
	}
}
{
	"databar": {
		"min": 0,
		"max": { "aggregate": "max" },
		"color": {
			"scale": [
				{
					"value": 0,
					"color": "#FFFFFF"
				},
				{
					"value": { "aggregate": "max" },
					"color": "#FFD851"
				}
			]
		}
	}
}