Closed dynamichny closed 2 years ago
As said in the title, all the values can be the same, and the chart won't show - the cause is simple - in createGraphPath there is an issue in getting y value for certain x
createGraphPath
y
x
const y = height - ((value - minValue) / (maxValue - minValue)) * innerHeight - graphPadding
so if the value is 5 all the way then it's height - ((5 - 5) / (5 - 5)) * anything and it will give as NaN
height - ((5 - 5) / (5 - 5)) * anything
As said in the title, all the values can be the same, and the chart won't show - the cause is simple - in
createGraphPath
there is an issue in gettingy
value for certainx
so if the value is 5 all the way then it's
height - ((5 - 5) / (5 - 5)) * anything
and it will give as NaN