mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-04-03 22:47:30 +02:00
add plot cursor sync to nodelist rows
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
yunit = "",
|
||||
title = "",
|
||||
forResources = false,
|
||||
plotSync,
|
||||
plotSync = null,
|
||||
} = $props();
|
||||
|
||||
/* Const Init */
|
||||
@@ -204,11 +204,7 @@
|
||||
live: true,
|
||||
},
|
||||
cursor: {
|
||||
drag: { x: true, y: true },
|
||||
sync: {
|
||||
key: plotSync.key,
|
||||
scales: ["x", null],
|
||||
}
|
||||
drag: { x: true, y: true }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -293,6 +289,14 @@
|
||||
if (!uplot) {
|
||||
opts.width = ren_width;
|
||||
opts.height = ren_height;
|
||||
|
||||
if (plotSync) {
|
||||
opts.cursor.sync = {
|
||||
key: plotSync.key,
|
||||
scales: ["x", null],
|
||||
}
|
||||
}
|
||||
|
||||
uplot = new uPlot(opts, data, plotWrapper); // Data is uplot formatted [[X][Ymin][Yavg][Ymax]]
|
||||
plotSync.sub(uplot)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user