remove crashing elements that attempt to limit the X-range displayed (#7015)

This commit is contained in:
Danglewood
2025-01-30 19:10:46 -08:00
committed by GitHub
parent 39a7e3e02e
commit ad5e772827
2 changed files with 47 additions and 70 deletions

View File

@@ -632,28 +632,6 @@ function Chart({
if (theme !== "dark") {
setChangeTheme(true);
}
const traceTypes = originalData.data.map(
(trace) => trace.type === "candlestick",
);
if (
(originalData.data[0]?.x !== undefined &&
originalData.data[0]?.x.length <= 1000) ||
!traceTypes.includes(true)
)
return;
setModal({
name: "alertDialog",
data: {
title: "Warning",
content: `Data has been truncated to 1000 points for performance reasons.
Please use the zoom tool to see more data.`,
},
});
const new_figure = CreateDataXrange(originalData);
setPlotData(new_figure);
setDateSliced(true);
setAutoScaling(true);
}
}, [plotLoaded]);

File diff suppressed because one or more lines are too long