We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 792eca4 commit 6462f25Copy full SHA for 6462f25
src/graph-types/polyline.ts
@@ -18,6 +18,11 @@ export default function polyline(chart: Chart) {
18
const yRange = chart.meta.yScale.range()
19
let yMax = yRange[0]
20
let yMin = yRange[1]
21
+
22
+ // Fix #342
23
+ // When yAxis is reversed, the yRange is inverted, i.e. yMin > yMax
24
+ if (yMin > yMax) [yMin, yMax] = [yMax, yMin]
25
26
// workaround, clamp assuming that the bounds are finite but huge
27
const diff = yMax - yMin
28
yMax += diff * 1e6
0 commit comments