How to use the plottable.Plots.Line function in plottable

To help you get started, we’ve selected a few plottable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github devinit / datahub / src / components / organisms / Charts / components / LineChart / LineChart.tsx View on Github external
private addDatasets(data: DataPoint[]) {
    const groupedBySeries = groupBy(data, datum => datum.series);
    const seriesNames = Object.keys(groupedBySeries);
    const plot = new Plots.Line();
    seriesNames.forEach(series => plot.addDataset(new Dataset(groupedBySeries[series])));

    return plot;
  }