KpiTile

A KPI Tile Control that displays key performance indicators in a tile format.

Import
the javascript logo
import { KpiTile } from "@schukai/monster/source/components/data/kpi-tile.mjs";
Source
the git logo
Package
the npm logo
Since
4.38.0

Tile Simple

The following example shows a simple control that displays values – nothing more, nothing less.

Javascript

// import "@schukai/monster/source/components/data/kpi-tile.mjs";

HTML

<monster-kpi-tile
  data-monster-option-values-top="Sales"
  data-monster-option-values-bottom="2023"
  data-monster-option-values-main="1500,00"
  data-monster-option-values-small="USD"
>
</monster-kpi-tile>

Stylesheet

/** no additional stylesheet is defined **/

Tile With Labels

Javascript

/** this example does not use an extra script **/

HTML

/** this example does not use an extra html file **/

Stylesheet

/** no additional stylesheet is defined **/

HTML Structure

<monster-kpi-tile></monster-kpi-tile>

JavaScript Initialization

const element = document.createElement('monster-kpi-tile');
document.body.appendChild(element);

Exported

KpiTile

Derived from

CustomElement

Options

The Options listed in this section are defined directly within the class. This class is derived from several parent classes, including the CustomElement class. Therefore, it inherits Options from these parent classes. If you cannot find a specific Options in this list, we recommend consulting the documentation of the CustomElement.

Option
Type
Default
Description
object
templates
templates.main
string
undefined
The main template for the KPI Tile control.
object
values
values.main
string
The main value displayed in the tile.
values.small
string
The small value displayed in the tile.
values.top
string
The top value displayed in the tile.
values.bottom
string
The bottom value displayed in the tile.

  • since
  • deprecated

Properties and Attributes

The Properties and Attributes listed in this section are defined directly within the class. This class is derived from several parent classes, including the CustomElement class and ultimately from HTMLElement. Therefore, it inherits Properties and Attributes from these parent classes. If you cannot find a specific Properties and Attributes in this list, we recommend consulting the documentation of the CustomElement.

  • data-monster-options: Sets the configuration options for the collapse component when used as an HTML attribute.
  • data-monster-option-[name]: Sets the value of the configuration option [name] for the collapse component when used as an HTML attribute.

Methods

The methods listed in this section are defined directly within the class. This class is derived from several parent classes, including the CustomElement class and ultimately from HTMLElement. Therefore, it inherits methods from these parent classes. If you cannot find a specific method in this list, we recommend consulting the documentation of the CustomElement.

Static methods

[instanceSymbol]()4.38.0
A KPI Tile Control
getCSSStyleSheet()
getTag()

Lifecycle methods

Lifecycle methods are called by the environment and are usually not intended to be called directly.

[assembleMethodSymbol]()

Events

This component does not fire any public events. It may fire events that are inherited from its parent classes.

The current width of the area is too small to display the content correctly.