Bhuber (talk | contribs)
No edit summary
Bhuber (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 29: Line 29:
|Value
|Value
|Type in a fixed value (needs to be changed manually)
|Type in a fixed value (needs to be changed manually)
Or get the value from a spreadsheet or SMW query
or get the value from a spreadsheet
(see [[#Available parameters]])
(see [[#Sources for values]])


Note: the value needs to be an '''integer'''.
Note: The value needs to be an '''integer'''.
|-
|-
|Common
|Common
Line 41: Line 41:
|Maximum value
|Maximum value
|your sales target, e.g. <code>100000</code>
|your sales target, e.g. <code>100000</code>
Note: the value needs to be an '''integer.'''
Note: The value needs to be an '''integer'''.
|-
|-
|Advanced
|Advanced
Line 53: Line 53:
|Advanced
|Advanced
|Link
|Link
|(optional), e.g. <code>Sales Targets</code> ''(note that this field has no autocomplete function, so you need to know the exact full name of the page (including namespace prefix, if applicable)''
|(optional), e.g. <code>Sales Targets</code> ''(This field has no autocomplete function, so you need to know the exact full name of the page, including the namespace prefix, if applicable.)''
|}
|}


== Creating a KPI progress bar ==
== Creating a KPI progress bar ==
Use when the metric represents advancement toward a fixed goal. There is a clear start (0) and a clear finish ("How far have we gotten toward the goal?").  
Use a progress bar when the metric represents advancement toward a fixed goal. There is a clear start (0) and a clear finish ("How far have we gotten toward the goal?").


The target can go in either direction, e.g. you want to go towards 100% (closed tickets) or 0 (open tickets), depending on your view.[[File:Extension KPIVisuals - progress bar.png|alt=Progress bar showing 2 open tickets with a green indicator|center|thumb|200x200px|KPI progress bar]]
The target can go in either direction, depending on your view, e.g. towards 100% (closed tickets) or towards 0 (open tickets).[[File:Extension KPIVisuals - progress bar.png|alt=Progress bar showing 2 open tickets with a green indicator|center|thumb|200x200px|KPI progress bar]]




{| class="wikitable"
{| class="wikitable"
|+Example: Show open tickets (= pages with a "Status" property)
|+Example: Show open tickets (= pages in the category "Open tickets")
!Tab
!Tab
!Parameter
!Parameter
Line 70: Line 70:
|Common
|Common
|Value
|Value
|Example: if you have a Property "Status" in your wiki, count the pages with value "in progress"<syntaxhighlight lang="text">
|Number of pages in the category "Open tickets":<syntaxhighlight lang="text">
{{#ask:[[Status::in progress]] |format=count }}
{{PAGESINCATEGORY:Open tickets}}
</syntaxhighlight>
</syntaxhighlight>
|-
|-
Line 80: Line 80:
|Advanced
|Advanced
|Maximum value
|Maximum value
|Show all pages that have a value for the "Status" property:<syntaxhighlight lang="text">
|Number of all pages in the category "Tickets":<syntaxhighlight lang="text">
{{#ask:[[Status::+]] |format=count }}
{{PAGESINCATEGORY:Tickets}}
</syntaxhighlight>
</syntaxhighlight>
|-
|-
Line 90: Line 90:


== Creating a KPI tile ==
== Creating a KPI tile ==
When using tiles, you put the emphasis directly on the current snapshot value without visually indicating the comparison value ("Where are we right now?").  
Tiles put the emphasis directly on the current snapshot value without visually indicating the comparison value ("Where are we right now?").


To create multiple tiles in a row, simply insert the KPI tiles multiple times on a page. You can copy and paste the first tile and simply change the necessary parameters for subsequent tiles.
To create multiple tiles in a row, insert the KPI tile multiple times on a page. You can copy and paste the first tile and change only the necessary parameters for subsequent tiles.
[[File:Extension KPIVisuals - tile.png|alt=3 red green and yellow tiles for a total of 6 open tickets|center|thumb|650x650px|KPI tiles]]
[[File:Extension KPIVisuals - tile.png|alt=3 red, green and yellow tiles for a total of 6 open tickets|center|thumb|650x650px|KPI tiles]]


{| class="wikitable"
{| class="wikitable"
|+Example: Show a tile for pages that have the SMW property "Status"
|+Example: Show a tile for pages in the category "New tickets"
!Tab
!Tab
!Parameter
!Parameter
Line 103: Line 103:
|Common
|Common
|Value
|Value
|Example: if you have a Property "Status" in your wiki, count the pages with value "in progress"<syntaxhighlight lang="text">
|Number of pages in the category "New tickets":<syntaxhighlight lang="text">
{{#ask:[[Status::new]] |format=count }}
{{PAGESINCATEGORY:New tickets}}
</syntaxhighlight>
</syntaxhighlight>
|-
|-
Line 113: Line 113:
|Advanced
|Advanced
|Maximum value
|Maximum value
|Show all pages that have a value for the "Status" property:<syntaxhighlight lang="text">
|Number of all pages in the category "Tickets":<syntaxhighlight lang="text">
{{#ask:[[Status::+]] |format=count }}
{{PAGESINCATEGORY:Tickets}}
</syntaxhighlight>
</syntaxhighlight>
|-
|-
Line 123: Line 123:


== Creating a KPI trend indicator ==
== Creating a KPI trend indicator ==
When using a trend indicator, you want to emphasize the fact that a value is improving or getting worse.
A trend indicator emphasizes whether a value is improving or getting worse.




Line 137: Line 137:
|Common
|Common
|Value
|Value
|current value, e.g 50000
|current value, e.g. 50000
|-
|-
|Common
|Common
Line 157: Line 157:


== Available parameters ==
== Available parameters ==
Each KPI visual needs at least a value, a maximum value, thresholds where the color indicator changes and a label to identify the indicator.  
Each KPI visual needs at least a value, a maximum value, thresholds where the color indicator changes, and a label to identify the indicator.
{| class="wikitable"
{| class="wikitable"
|+
|+
!
!Tab
!Parameter
!Parameter
!Visualization
!Visualization
Line 168: Line 168:
|Common
|Common
|Value
|Value
|gauge, progress bar, tile, trend
|gauge, progress bar, tile, trend
|Can be calculated from an SMW property:<syntaxhighlight lang="text">
|Can be taken from a [[Extension/Spreadsheets|spreadsheet cell]]:<syntaxhighlight lang="text">{{#sheetCell:Sales_data|E3}}</syntaxhighlight>Or calculated from the number of pages in a category:<syntaxhighlight lang="text">{{PAGESINCATEGORY:Open tickets}}</syntaxhighlight>{{Textbox|boxtype=note|header=Note:|text=The value needs to be an integer.|icon=no}}
{{#ask:[[Status::open]]|format=count}}
[[mediawikiwiki:Help:Extension:ParserFunctions|Parser functions]] that result in an integer, e.g. <code><nowiki>{{#expr:4+5}}</nowiki></code>, are also supported.
</syntaxhighlight>Or from a [[Extension/Spreadsheets|spreadsheet cell]]:<syntaxhighlight lang="text">{{#sheetCell:Sales_data|E3}}</syntaxhighlight>{{Textbox|boxtype=note|header=Note:|text=The value needs to be an integer.|icon=no}}
[[mediawikiwiki:Help:Extension:ParserFunctions|Parser functions]] that result in an integer, e.g. <code><nowiki>{{#expr:4+5}}</nowiki></code> , are also supported.
|current numeric value to display (required)
|current numeric value to display (required)
|-
|
|
|
|
|
|-
|-
|Common
|Common
|Label
|Label
|gauge, progress bar, tile, trend
|gauge, progress bar, tile, trend
|Any short label that describes the KPI visual.
|Any short label that describes the KPI visual.
|text label that is displayed below the indicator (optional)
|text label that is displayed below the indicator (optional)
Line 191: Line 183:
|tile
|tile
|Any text that describes the KPI visual.
|Any text that describes the KPI visual.
|text description that is displayed below the value
|text description that is displayed below the value
|-
|-
|Advanced
|Advanced
|Maximum value
|Maximum value
|gauge, progress bar, tile
|gauge, progress bar, tile
|Can be calculated from an SMW property:<syntaxhighlight lang="text">{{#ask:[[Status::+]]|format=count}}</syntaxhighlight>{{Textbox|boxtype=note|header=Note:|text=The value needs to be an integer.|icon=no}}
|Can be calculated, for example, from the number of pages in a category:<syntaxhighlight lang="text">{{PAGESINCATEGORY:Tickets}}</syntaxhighlight>{{Textbox|boxtype=note|header=Note:|text=The value needs to be an integer.|icon=no}}
|value representing 100% completion (default: 100)
|value representing 100% completion (default: 100)
|-
|-
Line 202: Line 194:
|Unit
|Unit
|gauge, progress bar, tile
|gauge, progress bar, tile
|<code>%</code>, <code>pages</code>, <code>users</code> or any other text
|<code>%</code>, <code>pages</code>, <code>users</code> or any other text
|text-based unit of measurement appended to the displayed value (optional)
|text-based unit of measurement appended to the displayed value (optional)
|-
|-
Line 209: Line 201:
|gauge, progress bar, tile, trend
|gauge, progress bar, tile, trend
|true, false
|true, false
|will output a calculated percentage of <code>value/max %</code> rather than <code>value unit</code>; overwrites any text in the "Unit" parameter
|outputs a calculated percentage of <code>value/max %</code> rather than <code>value unit</code>; overwrites any text in the "Unit" parameter
|-
|-
|Advanced
|Advanced
|Show scale
|Show scale
|gauge, progress bar, tile
|gauge, progress bar, tile
|true, false
|true, false
|shows the range from the minimum (0) to the maximum value below the value as a reference point
|shows the range from the minimum (0) to the maximum value below the value as a reference point
Line 221: Line 213:
|tile
|tile
|<code>bi bi-house</code>, <code>bi bi-arrow-right-circle</code>
|<code>bi bi-house</code>, <code>bi bi-arrow-right-circle</code>
|displays a [https://icons.getbootstrap.com/#icons bootstrap icon] before the label
|displays a [https://icons.getbootstrap.com/#icons Bootstrap icon] before the label
|-
|-
|Advanced
|Advanced
Line 229: Line 221:
<code>0:red | 0.3:yellow | 0.8:green</code>
<code>0:red | 0.3:yellow | 0.8:green</code>
Note that only three zones are possible (red, yellow, green).
Note that only three zones are possible (red, yellow, green).
|<nowiki>defines color zones as ratio:color pairs, separated by “|” . Values range from 0 to 1.</nowiki>
|<nowiki>defines color zones as ratio:color pairs, separated by "|". Values range from 0 to 1.</nowiki>
|-
|-
|Advanced  
|Advanced
|Link
|Link
|gauge, progress bar, tile, trend
|gauge, progress bar, tile, trend
|Wiki link: <code>Sales Targets</code><br />Interwiki link: <code>sales:Sales Targets</code><br />External link:<code><nowiki>https://bluespice.com</nowiki></code>
|Wiki link: <code>Sales Targets</code><br />Interwiki link: <code>sales:Sales Targets</code><br />External link: <code><nowiki>https://bluespice.com</nowiki></code>
|links the KPI visual to a wiki page or an external page
|links the KPI visual to a wiki page or an external page
|-
|-
Line 242: Line 234:
|
|
|defines the neutral range
|defines the neutral range
Example: 0.05 means ±5% difference from the baseline shows no trend.
Example: 0.05 means that a difference of ±5% from the baseline shows no trend.
|-
|-
|Advanced
|Advanced
Line 248: Line 240:
|trend
|trend
|<code>Medium</code>, <code>Small</code>
|<code>Medium</code>, <code>Small</code>
|size of visual indicator
|size of the visual indicator
|-
|-
|Advanced
|Advanced
|Show difference
|Show difference
|trend
|trend
|adds a label below the graphic arrow (recommended for accessibility reasons)
|adds a label below the graphic arrow (recommended for accessibility reasons)
|shows the difference between current value and baseline
|shows the difference between current value and baseline
|}
|}


== Sources for values ==
== Sources for values ==
Although values and maximum values can be manually maintained, it makes sense to automatically update the data. Here is a list of potential sources for values of type <code>integer</code>.
Although values and maximum values can be maintained manually, it makes sense to update the data automatically. Here is a list of potential sources for values of type <code>integer</code>.
{| class="wikitable"
{| class="wikitable"
|+Sources for KPI values
|+Sources for KPI values
Line 266: Line 258:
|Manually entered
|Manually entered
|<code>100</code>, <code>1000</code>, <code>234567</code>
|<code>100</code>, <code>1000</code>, <code>234567</code>
|-
|[[SMW queries|Semantic MediaWiki query]]
|<code><nowiki>{{#ask:[[Status::+]]|format=count}}</nowiki></code><br /><code><nowiki>{{#show:[[Statistics]]|?Population}}</nowiki></code>
|-
|-
|[[Extension/Spreadsheets|Wiki spreadsheet cell]]
|[[Extension/Spreadsheets|Wiki spreadsheet cell]]
Line 276: Line 265:
|<code><nowiki>{{#spreadsheetfilecell:MyFile.xlsx|A7}}</nowiki></code>, <code><nowiki>{{#spreadsheetfilecell:MyFile.ods|A7}}</nowiki></code>
|<code><nowiki>{{#spreadsheetfilecell:MyFile.xlsx|A7}}</nowiki></code>, <code><nowiki>{{#spreadsheetfilecell:MyFile.ods|A7}}</nowiki></code>
|-
|-
|[Extension/External Data|External Data query]]<!-- not available in Galaxy -->
|[[Extension/External Data|External Data query]]<!-- not available in Galaxy -->
|<code><nowiki>{{#external_value:Population|source=https://discoursedb.org/GermanyCSV.txt}}</nowiki></code>
|<code><nowiki>{{#external_value:Population|source=https://discoursedb.org/GermanyCSV.txt}}</nowiki></code>
(Note: cannot be configured for cloud wikis if source is not public)
(Note: cannot be configured for cloud wikis if the source is not public)
|-
|-
|Transcluded csv file
|Transcluded CSV page
|<code><nowiki>{{:My csv page}}</nowiki></code>
|<code><nowiki>{{:My csv page}}</nowiki></code>
|-
|-
|[[mediawikiwiki:Help:Magic_words#Statistics|Magic words]]
|[[mediawikiwiki:Help:Magic_words#Statistics|Magic words]]
|<code><nowiki>{{NUMBEROFPAGES}}</nowiki></code>, <code><nowiki>{{NUMBEROFACTIVEUSERS}}</nowiki></code>, <code><nowiki>{{PAGESINCATEGORY:categoryname}}</nowiki></code>
|<code><nowiki>{{NUMBEROFPAGES}}</nowiki></code>, <code><nowiki>{{NUMBEROFACTIVEUSERS}}</nowiki></code>, <code><nowiki>{{PAGESINCATEGORY:categoryname}}</nowiki></code>
|-
|-
|[[mediawikiwiki:Help:Extension:ParserFunctions##expr|Parser function #expr]]
|[[mediawikiwiki:Help:Extension:ParserFunctions#expr|Parser function #expr]]
|<code><nowiki>{{#expr:20+50}}</nowiki></code>
|<code><nowiki>{{#expr:20+50}}</nowiki></code>
|}
|}
Line 292: Line 281:
== Accessibility ==
== Accessibility ==


* '''Use of color:''' Make sure to use label text that clearly explains the number. Do not rely on the color alone for conveying the meaning. For example, negative numbers should have a qualifier (<code>-</code>) instead of just being formatted with a red background. {{WCAGref|use-of-color}}
* '''Use of color:''' Make sure to use label text that clearly explains the number. Do not rely on color alone to convey meaning. For example, negative numbers should have a qualifier (<code>-</code>) instead of just being formatted with a red background. {{WCAGref|use-of-color}}
* '''Screenreaders''' will read the badge as a combination of current value and max value via an <code>aria-label</code> (for example, "A gauge showing 32670 of 100000 with label 'Sales Target Midmarket". {{WCAGref|text-alternatives}}
* '''Screen readers''' read the KPI visual as a combination of current value and maximum value via an <code>aria-label</code> (for example, "A gauge showing 32670 of 100000 with label 'Sales Target Midmarket'"). {{WCAGref|text-alternatives}}

Latest revision as of 15:06, 10 November 2026

SkySapphire

KPIVisuals allows you to create meaningful dashboards that help evaluate the current status of quantitative information. With KPI visuals, you can compare a maximum value to a current value and visually show the difference.

Adding KPI visuals

The following KPI visuals are available:

  • KPI gauge
  • KPI progress bar
  • KPI tile
  • KPI trend indicator


To add a KPI visual to a page:


Content droplets menu
Selecting a Content droplet
  1. Open the Content droplets menu.
  2. Search for "KPI".
  3. Insert the Content droplet on the page.


See the examples on this page for information about each KPI visual type.

Creating a KPI gauge

Use a KPI gauge when the metric has a meaningful range with three zones. You want to instantly judge where in that range the current value sits ("Is this in a good zone or bad zone?").

KPI gauge for "Sales Target Midmarket" showing 32.7% with a red indicator
KPI gauge


Example: Show the status of your sales goals
Tab Parameter Description
Common Value Type in a fixed value (needs to be changed manually)

or get the value from a spreadsheet (see #Sources for values)

Note: The value needs to be an integer.

Common Label for example: Sales Target Midmarket
Advanced Maximum value your sales target, e.g. 100000

Note: The value needs to be an integer.

Advanced Show as percentage select the checkbox
Advanced Thresholds 0.3:red|0.5:yellow|0.85:green
Advanced Link (optional), e.g. Sales Targets (This field has no autocomplete function, so you need to know the exact full name of the page, including the namespace prefix, if applicable.)

Creating a KPI progress bar

Use a progress bar when the metric represents advancement toward a fixed goal. There is a clear start (0) and a clear finish ("How far have we gotten toward the goal?").

The target can go in either direction, depending on your view, e.g. towards 100% (closed tickets) or towards 0 (open tickets).

Progress bar showing 2 open tickets with a green indicator
KPI progress bar


Example: Show open tickets (= pages in the category "Open tickets")
Tab Parameter Description
Common Value Number of pages in the category "Open tickets":
{{PAGESINCATEGORY:Open tickets}}
Common Label Open tickets
Advanced Maximum value Number of all pages in the category "Tickets":
{{PAGESINCATEGORY:Tickets}}
Advanced Thresholds 0.3:green|0.5:yellow|0.8:red

Creating a KPI tile

Tiles put the emphasis directly on the current snapshot value without visually indicating the comparison value ("Where are we right now?").

To create multiple tiles in a row, insert the KPI tile multiple times on a page. You can copy and paste the first tile and change only the necessary parameters for subsequent tiles.

3 red, green and yellow tiles for a total of 6 open tickets
KPI tiles
Example: Show a tile for pages in the category "New tickets"
Tab Parameter Description
Common Value Number of pages in the category "New tickets":
{{PAGESINCATEGORY:New tickets}}
Common Label New tickets
Advanced Maximum value Number of all pages in the category "Tickets":
{{PAGESINCATEGORY:Tickets}}
Advanced Thresholds 0.3:green|0.5:yellow|0.8:red

Creating a KPI trend indicator

A trend indicator emphasizes whether a value is improving or getting worse.


Green up-arrow with label "Sales trend" and value 50%
KPI trend indicator


Example: Show the trend for sales scope B2B
Tab Parameter Description
Common Value current value, e.g. 50000
Common Baseline value reference value, e.g. 85000
Common Label B2B
Advanced Show difference select the checkbox
Advanced Show as percentage select the checkbox

Available parameters

Each KPI visual needs at least a value, a maximum value, thresholds where the color indicator changes, and a label to identify the indicator.

Tab Parameter Visualization Example Description
Common Value gauge, progress bar, tile, trend Can be taken from a spreadsheet cell:
{{#sheetCell:Sales_data|E3}}
Or calculated from the number of pages in a category:
{{PAGESINCATEGORY:Open tickets}}
Note:The value needs to be an integer.

Parser functions that result in an integer, e.g. {{#expr:4+5}}, are also supported.

current numeric value to display (required)
Common Label gauge, progress bar, tile, trend Any short label that describes the KPI visual. text label that is displayed below the indicator (optional)
Common Description tile Any text that describes the KPI visual. text description that is displayed below the value
Advanced Maximum value gauge, progress bar, tile Can be calculated, for example, from the number of pages in a category:
{{PAGESINCATEGORY:Tickets}}
Note:The value needs to be an integer.
value representing 100% completion (default: 100)
Advanced Unit gauge, progress bar, tile %, pages, users or any other text text-based unit of measurement appended to the displayed value (optional)
Advanced Show as percentage gauge, progress bar, tile, trend true, false outputs a calculated percentage of value/max % rather than value unit; overwrites any text in the "Unit" parameter
Advanced Show scale gauge, progress bar, tile true, false shows the range from the minimum (0) to the maximum value below the value as a reference point
Advanced Icon CSS class tile bi bi-house, bi bi-arrow-right-circle displays a Bootstrap icon before the label
Advanced Thresholds gauge, progress bar, tile Default definition:

0:red | 0.3:yellow | 0.8:green Note that only three zones are possible (red, yellow, green).

defines color zones as ratio:color pairs, separated by "|". Values range from 0 to 1.
Advanced Link gauge, progress bar, tile, trend Wiki link: Sales Targets
Interwiki link: sales:Sales Targets
External link: https://bluespice.com
links the KPI visual to a wiki page or an external page
Advanced Tolerance trend defines the neutral range

Example: 0.05 means that a difference of ±5% from the baseline shows no trend.

Advanced Size trend Medium, Small size of the visual indicator
Advanced Show difference trend adds a label below the graphic arrow (recommended for accessibility reasons) shows the difference between current value and baseline

Sources for values

Although values and maximum values can be maintained manually, it makes sense to update the data automatically. Here is a list of potential sources for values of type integer.

Sources for KPI values
Source Example
Manually entered 100, 1000, 234567
Wiki spreadsheet cell {{#sheetCell:Sales_data|E3}}, {{#sheetcell:Sales_data|Sheet1!E7}}
Uploaded spreadsheet {{#spreadsheetfilecell:MyFile.xlsx|A7}}, {{#spreadsheetfilecell:MyFile.ods|A7}}
External Data query {{#external_value:Population|source=https://discoursedb.org/GermanyCSV.txt}}

(Note: cannot be configured for cloud wikis if the source is not public)

Transcluded CSV page {{:My csv page}}
Magic words {{NUMBEROFPAGES}}, {{NUMBEROFACTIVEUSERS}}, {{PAGESINCATEGORY:categoryname}}
Parser function #expr {{#expr:20+50}}

Accessibility

  • Use of color: Make sure to use label text that clearly explains the number. Do not rely on color alone to convey meaning. For example, negative numbers should have a qualifier (-) instead of just being formatted with a red background. WCAG #use-of-color
  • Screen readers read the KPI visual as a combination of current value and maximum value via an aria-label (for example, "A gauge showing 32670 of 100000 with label 'Sales Target Midmarket'"). WCAG #text-alternatives