Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Updates existing plot with new points
this.u.setData(uPlotData);
} else {
const options = configureUPlotLineChart(
metrics,
axis,
data,
this.setNewTimeRange,
() => this.xAxisDomain,
() => this.yAxisDomain,
);
if (this.u) {
this.u.destroy();
}
this.u = new uPlot(options, uPlotData, this.el.current);
}
}