Top.Mail.Ru
Percentage KPI
CTRL+K

Percentage KPI

In this article
  • Percentage KPI
  • Widget Settings
  • Data Settings
  • Display Settings
  • Filtering Settings
  • Widget Configuration in YAML
  • Data Settings in YAML
  • Display Settings in YAML
  • Filtering Settings in YAML
  • Example of a Configured Widget in the YAML Editor

A Percentage KPI is a widget that displays a key metric as a percentage, emphasizing critical performance indicators.

The value’s starting point is at the top, similar to a clock face.

Percentage KPI example

The Percentage KPI can:

  • Display both positive and negative values
  • Display values exceeding 100% (if the value doesn’t fit within the circular scale, an ellipsis appears)
Note

In Browse mode, click-based filtering and hover tooltips are not available for the Percentage KPI.

Widget Settings

In addition to the common settings, this widget has unique configuration options.

Data Settings

The widget supports the general data settings.

Additionally, the following settings are available for each measure:

  • Font size
  • Font weight
  • Title (toggle to show/hide the measure name)
  • Position (display the measure name above or below the indicator)
  • Title size
  • Color:
    • Auto
    • Solid
    • Gradient (if the value exceeds 100%, the indicator bar uses the final gradient color; the number of gradient classes does not affect this behavior)
    • By rule (supports rules in Solid, By measure, and Custom modes)
    • Custom
  • Display (display condition)

You can add an unlimited number of measures, but only one is displayed—the first in the list or the first that satisfies a display condition.

By default, the widget uses Percentage format, where the measure value is automatically multiplied by 100. The Number format is also available.

Display Settings

Standard display settings apply. Additionally, you can align the indicator to the left, center, or right.

Note

If any column in the same row has a height greater than the Percentage KPI, the widget’s height expands to match the tallest column. If all other columns are shorter, the widget retains its original height.

Filtering Settings

The widget supports general filtering settings, except for filter mode selection.

Widget Configuration in YAML

You can edit the widget not only in the visual editor but also in the YAML editor. The table below lists the keys and values available for configuration. For details on working with the value key, see Dimension and measure values in YAML. Supported data formats are described on the relevant page. General widget parameters are covered in Widget configuration in YAML.

Data Settings in YAML

KeyTypeDefinition
titlestringTitle
showMarkdownbooleanDescription
markdownTextstringDescription text
markdownMeasuresMeasures in description
measuresMeasures
keystringWidget key

Measures in YAML (key: measures)

KeyTypeDefinition
namestringMeasure name
valueMeasure formula
dbDataTypeenumFormula data type
formatenumFormat
formattingenumFormatting
showTitlebooleanShow measure title
positionenumMeasure title position:
- TOP — above
- BOTTOM — below
fontSizenumberFont size

To enable automatic sizing, set to null
fontWeightenumMeasure font weight:
- NORMAL — normal
- BOLD — bold
colorColor

Modes:
- DISABLED — disabled
- AUTO — auto
- GRADIENT — gradient
- FORMULA — by formula
- RULE — by rule
displayConditionDisplay condition

Display Settings in YAML

KeyTypeDefinition
paddingsstringSide paddings
widthnumberWidth
heightnumberHeight
titleSizenumberTitle size
titleColorTitle color:
- AUTO — auto
- BASE — solid
titleWeightenumFont weight:
- NORMAL — normal
- BOLD — bold
alignmentenumAlignment:
- LEFT — left
- CENTER — center
- RIGHT — right
markdownTextSizenumberMarkdown description text size
Available only if Description is enabled

Filtering Settings in YAML

KeyTypeDefinition
ignoreFiltersbooleanIgnore filters
filtersFilters
stateNamestringState

Example of a Configured Widget in the YAML Editor

widgets:
  - key: percentage-kpi
    apiVersion: "16"
    type: PERCENTAGE_KPI
    settings:
      appearance:
        enabled: false
      titleSize: 14
      titleColor:
        mode: AUTO
      titleWeight: NORMAL
      ignoreFilters: false
      stateName: null
      title: ""
      showMarkdown: false
      markdownMeasures: []
      markdownText: ""
      filters: []
      alignment: CENTER
      measures:
        - name: Quantity
          value:
            mode: FORMULA
            formula: count()
          dbDataType: UInt64
          format: NUMBER
          formatting: AUTO
          showTitle: true
          position: BOTTOM
          fontWeight: BOLD
          titleSize: 14
          color:
            mode: AUTO
          displayCondition:
            mode: DISABLED

Was the article helpful?

Yes
No
Previous
Indicator
We use cookies to improve our website for you.