This commit is contained in:
Zoltán Bedi 2021-10-28 13:02:31 +02:00
parent 1e7dd4f627
commit a8f198130c

View File

@ -134,7 +134,7 @@ export function collectStackingGroups(f: Field, groups: Map<string, number[]>, s
}
/**
* Finds y axis midpoind for point at given idx (css pixels relative to uPlot canvas)
* Finds y axis midpoint for point at given idx (css pixels relative to uPlot canvas)
* @internal
**/
@ -177,7 +177,7 @@ export function findMidPointYPosition(u: uPlot, idx: number) {
// find median position
y = (u.valToPos(min, u.series[sMinIdx].scale!) + u.valToPos(max, u.series[sMaxIdx].scale!)) / 2;
} else {
// snap tooltip to min OR max point, one of thos is not null :)
// snap tooltip to min OR max point, one of those is not null :)
y = u.valToPos((min || max)!, u.series[(sMaxIdx || sMinIdx)!].scale!);
}