palerdot/react-d3-speedometer

Supporting Negative range like -120 to 0

Closed this issue · 2 comments

Currently if i want to show the range from -120 to 0, its not working as expected.

In util/index.js
calculateSegmentStops returning the following " return (current_stop - customSegmentStops[index - 1]) / max " , Here max is 0 which might be resulting to infinite ,and instead it should be max-min which can fix the issue.

@sudhir451 This issue is fixed and released in v0.7.1. Reference sandbox - https://codesandbox.io/s/jolly-thompson-2k3d7 ... Please upgrade to v0.7.1 which will address this issue. Thanks for raising the issue and suggesting the solution.

Screenshot 2019-09-17 at 8 43 22 PM

Thanks @palerdot for the prompt response and resolving the issue.