Spanish Total.js
English
Documentation For AI agents
Contents

Charts and dashboard

Charts and values for dashboards.

.md GitHub
On this page

Charts and values for dashboards. This page holds the catalogue groups Charts and Dashboard.

A Line chart that shows four temperature values from a Data generator

Each entry gives the folder name and version of the component, its inputs and outputs, notes, its readme and its main settings: the key in the configuration, its default value and the field in the settings form. Every component also has Name and Read value from, described in Component settings. To add a component to a design, see Import components.

API

component

barchart · version 1

Shows series of values as horizontal bars.
ParameterTypeDescription
datetype? String Date type in the settings form. One of full (Full date), years (Years), months (Months), days (Days), hours (Hours). Default: full
unit? String Unit in the settings form.
decimals? Number Decimals in the settings form. Default: 0
min? Number Min value in the settings form.
max? Number Max value in the settings form.

Inputs: none.

Outputs: none.

  • Offered in Import components for designs of type app, dashboard.
  • Loads the external library apexcharts from cdnjs.cloudflare.com.

Barchart data-source needs to contain:

[
    {
        name: 'name', // name of the serie
        data: [{ x: 'DATE', y: 'value' }, { x: 'DATE', y: 'value' }, ...], // series
        decimals: 2, // optional, number of decimal places
        unit: '°C' // optional
    }
]
component

columnchart · version 1

Shows series of values as vertical columns.
ParameterTypeDescription
datetype? String Date type in the settings form. One of full (Full date), years (Years), months (Months), days (Days), hours (Hours). Default: full
unit? String Unit in the settings form.
decimals? Number Decimals in the settings form. Default: 0
min? Number Min value in the settings form.
max? Number Max value in the settings form.

Inputs: none.

Outputs: none.

  • Loads the external library apexcharts from cdnjs.cloudflare.com.

Columnchart data-source needs to contain:

[
    {
        name: 'name', // name of the serie
        data: [{ x: 'DATE', y: 'value' }, { x: 'DATE', y: 'value' }, ...], // series
        decimals: 2, // optional, number of decimal places
        unit: '°C' // optional
    }
]
component

donutchart · version 1

Shows values as parts of a ring.
ParameterTypeDescription
datasource? String Datasource in the settings form. A component (@id), a code list or a data view.
unit? String Unit in the settings form.
decimals? Number Decimals in the settings form. Default: 0

Inputs: none.

Outputs: none.

  • Loads the external library apexcharts from cdnjs.cloudflare.com.

Donutchart data-source needs to contain:

[
    {
        data: 44,
        name: 'Apple',
        unit: '',
        decimals: 1
    },
    {
        data: 55,
        name: 'Mango',
        unit: '',
        decimals: 1
    }
]
component

lastvalue · version 1

Shows one value with a note and an icon, for example the latest reading on a dashboard.
ParameterTypeDescription
icon? String Icon in the settings form. An icon class, for example ti ti-totaljs. Default: ti ti-dashboard
color? String Icon color in the settings form. A colour.
iconpos? String Icon position in the settings form. One of top (Top), overlay (Overlay). Default: overlay
isnullable? Boolean Render nullable value in the settings form.

Inputs: none.

Outputs: none.

This component displays text value and icon according to your styles in settings.

component

linechart · version 1

Shows series of values as lines over time.
ParameterTypeDescription
datetype? String Date type in the settings form. One of full (Full date), years (Years), months (Months), days (Days), hours (Hours). Default: full
unit? String Unit in the settings form.
decimals? Number Decimals in the settings form. Default: 0
min? Number Min value in the settings form.
max? Number Max value in the settings form.
stroke? String Line type in the settings form. One of smooth (Smooth), straight (Straight), stepline (Stepline). Default: smooth

Inputs: none.

Outputs: none.

  • Loads the external library apexcharts from cdnjs.cloudflare.com.

Linechart data-source needs to contain:

[
    {
        name: 'name', // name of the serie
        data: [{ x: 'DATE', y: 'value' }, { x: 'DATE', y: 'value' }, ...], // series
        decimals: 2, // optional, number of decimal places
        unit: '°C' // optional
    }
]
component

piechart · version 1

Shows values as slices of a circle.
ParameterTypeDescription
datasource? String Datasource in the settings form. A component (@id), a code list or a data view.
unit? String Unit in the settings form.
decimals? Number Decimals in the settings form. Default: 0

Inputs: none.

Outputs: none.

  • Loads the external library apexcharts from cdnjs.cloudflare.com.

Piechart data-source needs to contain:

[
    {
        data: 44,
        name: 'Apple',
        unit: '',
        decimals: 1
    },
    {
        data: 55,
        name: 'Mango',
        unit: '',
        decimals: 1
    }
]
Made in Europe