Tutorial

Google Colormap

This chart displays information on a world map using country codes, representing data with different colors.

Google Colormap

Example

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

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

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

let widget;
widget = googleColormapWidget('goole-colormap-example');
widget.setRequests([request]);
widget.setKeys('country');
widget.setValue('count');

See API