CHanged update rate

This commit is contained in:
Etienne Chassaing 2025-07-16 09:40:33 +02:00
parent 469db8f87c
commit 201f8b7f23

View File

@ -161,7 +161,6 @@
const allData = await response.json();
const puData = allData[`PU_${puNumber}`];
const timestamp = new Date(puData.timestamp);
Plotly.extendTraces('flow-plot-1', {
x: [[timestamp], [timestamp]],
y: [[puData.Qperm], [puData.Qdilute]]
@ -194,9 +193,9 @@
const range = getLastMinuteRange();
const plotIds = ['flow-plot-1', 'flow-plot-2', 'pressure-plot-1', 'pressure-plot-2', 'mv02-plot', 'mv03-plot', 'mv04-05-plot', 'mv06-plot', 'mv07-plot', 'mv08-plot'];
plotIds.forEach(id => {
Plotly.relayout(id, { 'xaxis.range': range });
});
// plotIds.forEach(id => {
// Plotly.relayout(id, { 'xaxis.range': range });
// });
} catch (error) {
console.error("Error updating plots:", error);
}
@ -290,7 +289,7 @@
title: 'MV08 (%)', yaxis: { range: [0, 100] }, xaxis: { type: 'date' }
});
setInterval(updatePlots, 100);
setInterval(updatePlots, 500);
}
window.onload = function() {