Configuration

Properties

DataMap Properties

Use the datamap configuration property to configure the data for the Compare KPI. The component expects these field names in its data configuration.

Below is an excerpt from the sample page in the Gentelella for WireBootstrap project for the Compare KPI component. Note, goodChange is not specified so in this example, it will default to true.

const kpi = new wire.gentelella.kpiCompare().render("#kpi", {
   ...
   cssIcon: "fa fa-trophy",
   lblChange: "Sales From Last Week",
   datamap: {value: "Sales", label: "Product", valueChange: "SalesOverLastWeek" }
});

Note also in the example above that the component supports static settings for datamap attributes directly on the root of the configuration object. This configuration option can be used for any setting that may not need to be set dynamically based in the implementation.

Last updated