I am trying to create a chart for my business with PlotlyJS under React. The graphics work well and the component is well designed. But however when the graph contains more than 30,000 points the browser crashes completely while waiting for it to load.
Is there a solution to integrate a large amount of data on plotly in a fluid way with react hooks?
Data recovery from the back end :
axios.post('/builder/chart', {
selectOneChart: id,
})
.then((response) => {
const chartSelected = JSON.parse(response.data.chartData);
setChart({
config: chartSelected.config,
layout: chartSelected.layout,
frames: chartSelected.frames,
data: chartSelected.data,
});
});
The Plotly component :
return (
<Plot
className={classes.fullSize}
config={chart.config}
layout={chart.layout}
frames={chart.frames}
data={chart.data}
advancedTraceTypeSelector
useResizeHandler
responsive
debug
/>
);