fix selection, add zero default

This commit is contained in:
Christoph Kluge
2023-12-05 17:33:30 +01:00
parent ead5c54bcb
commit 78494cd30e
3 changed files with 7 additions and 3 deletions

View File

@@ -320,6 +320,11 @@ export function convert2uplot(canvasData) {
let uplotData = [[],[]] // [X, Y1, Y2, ...]
canvasData.forEach( cd => {
if (cd.bin) { // MetricHisto Datafromat
// Force Zero Entry for scaling
if (uplotData[0].length == 0) {
uplotData[0].push(0)
uplotData[1].push(0)
}
uplotData[0].push(cd.max)
uplotData[1].push(cd.count)
} else { // Default