antoniolago / react-gauge-component

React gauge component for data visualization.
https://antoniolago.github.io/react-gauge-component/
MIT License
132 stars 19 forks source link

min- and maxValue changes will not trigger the labels to update #35

Closed flokol120 closed 7 months ago

flokol120 commented 7 months ago

The gauge fails to re-render when updating the minimum and maximum values, along with the ticks. To illustrate this issue, a minimal reproducible example has been provided in the following CodeSandbox link:

CodeSandbox Link

To observe the problem, simply modify the values in the text boxes corresponding to the minimum and maximum. The gauge will only reflect the changes if the actual value is also modified. Notably, adjusting the labels manually is insufficient for updating the minimum and maximum labels. Although the gauge display itself is seen to update in this scenario, the issue persists. Feel free to seek additional clarification or ask questions if needed.

antoniolago commented 7 months ago

Hey @flokol120 thanks for reporting this, I've just released a new version, 1.1.36, which should fix this.

flokol120 commented 7 months ago

Hey @flokol120 thanks for reporting this, I've just released a new version, 1.1.36, which should fix this.

Nice, thanks for the quick fix!