Tutorial

Gauge

The gauge meter widget illustrates the proportion of the indicated sets of values as portions of a wheel.

Gauge

Example

import RequestApi from '@devoinc/applications-data-library/requests/RequestApi';
import dateRange from '@devoinc/applications-builder/utils/dateRange';
import gaugeWidget from '@devoinc/applications-builder/widgets/gauge';

let query = `from demo.ecommerce.data
where clientIpAddress = 87.153.102.201
group every 1h
select count() as count
`;

let request = new RequestApi({
  query: query,
  dates: dateRange.fromNow(1, 'day'),
});

let widget;
widget = gaugeWidget('gauge-example');
widget.setRequests([request]);
widget.setValue('count');

See API