wip moving historical graph to uPlot, remove flot.js dependency

This commit is contained in:
Nick Krecklow
2020-05-11 02:28:41 -05:00
parent 9987434fea
commit 19a7ce7d91
5 changed files with 145 additions and 87 deletions

View File

@ -21,6 +21,26 @@ export class RelativeScale {
}
}
static scaleMatrix (data, tickCount) {
let max = Number.MIN_VALUE
for (const row of data) {
let testMax = Number.MIN_VALUE
for (const point of row) {
if (point > testMax) {
testMax = point
}
}
if (testMax > max) {
max = testMax
}
}
return RelativeScale.scale([0, max], tickCount)
}
static generateTicks (min, max, step) {
const ticks = []
for (let i = min; i <= max; i += step) {