feat: Add uplot histogram, implemented in userview

- For testing
- add conversion function to utils
This commit is contained in:
Christoph Kluge
2023-07-26 13:44:06 +02:00
parent 2655bda644
commit 742c2e399e
5 changed files with 205 additions and 45 deletions

View File

@@ -313,3 +313,13 @@ export function checkMetricDisabled(m, c, s) { //[m]etric, [c]luster, [s]ubclust
}
return false;
}
export function convert2uplot(canvasData) {
// initial use: Canvas Histogram Data to Uplot
let uplotData = [[],[]] // [X, Y1, Y2, ...]
canvasData.forEach( pair => {
uplotData[0].push(pair.value)
uplotData[1].push(pair.count)
})
return uplotData
}