Tutorial

Funnel

The funnel widget shows the progressive reduction of data as it goes from one phase to another. In each of the phases, data is represented as different portions of a whole.

Funnel

Example

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

let query = `from demo.ecommerce.data
where clientIpAddress = 87.153.102.201 
or clientIpAddress = 58.14.227.52 
or clientIpAddress = 48.126.91.202
group  by method, clientIpAddress
select count() as count
`;

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

let widget;
widget = funnelWidget('funnel-example');
widget.setRequests([request]);
widget.setKeys(['method', 'clientIpAddress']);
widget.setValue('count');

See API