Draw the charts on your own page

The same share token also drives a small JavaScript library built on Apache ECharts. It draws the product’s charts, with the same colours and rules, and handles resizing, light and dark themes, language and accessibility for you. Use the custom element for a plain page, or the module in your own code:

<script src="https://cdn.jsdelivr.net/npm/echarts@6/dist/echarts.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@event-horizon-data/charts/dist/eh-chart.global.js"></script>

<eh-chart token="<share token>" widget="<widget id>" theme="auto"></eh-chart>
npm install @event-horizon-data/charts echarts

import { createClient, mount } from '@event-horizon-data/charts';

const client = createClient({ token: '<share token>' });
const chart = mount(document.getElementById('revenue'), {
  client,
  widgetId: '<widget id>',
  theme: 'auto',
});

The library also draws KPI tiles and tables, lets readers drag across a chart to zoom, narrows one chart from a click on another, and can label hourly points in a time zone you choose. Filter controls and pivot tables are not drawn.

Send your first event.

Create an account and get from raw data to a dashboard in minutes.