Changed setpoints of all PUs from PU2 sp
This commit is contained in:
parent
c7c850129c
commit
d9b59c73b8
|
|
@ -94,7 +94,7 @@ function initAllPlots() {
|
|||
y: [0],
|
||||
mode: 'lines',
|
||||
line: { dash: 'dash', color: 'red' },
|
||||
name: `${plot.refKey} (PU3)`,
|
||||
name: `${plot.refKey} (PU2)`,
|
||||
showlegend: true
|
||||
});
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ async function updateAllPlots() {
|
|||
|
||||
const SkidData = allData["PatientSkid"] || {};
|
||||
const DSData = allData["DS"] || {};
|
||||
const pu3Data = allData["PU_3"] || {}; // <--- take ref values from PU_3
|
||||
const pu2Data = allData["PU_2"] || {}; // <--- take ref values from PU_3
|
||||
|
||||
plots.forEach(plot => {
|
||||
const xUpdates = [];
|
||||
|
|
@ -160,9 +160,9 @@ async function updateAllPlots() {
|
|||
|
||||
Plotly.extendTraces(plot.id, { x: xUpdates, y: yUpdates }, puList.map((_, i) => i), maxPoints);
|
||||
|
||||
// Update PU3 reference line dynamically
|
||||
// Update PU2 reference line dynamically
|
||||
if (plot.refKey) {
|
||||
const refVal = pu3Data[plot.refKey];
|
||||
const refVal = pu2Data[plot.refKey];
|
||||
const refIndex = puList.length; // because ref trace was pushed last
|
||||
Plotly.extendTraces(plot.id,
|
||||
{ x: [[timestamp]], y: [[refVal ?? null]] },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user