react-gauge-chart
react-gauge-chart copied to clipboard
Needle shows current value before animating to it from 0
Hello,
I've got a gauge chart setup like this:
const chartStyle = {
height: 112.5,
}
return <div style={{width: "250px"}}>
<GaugeChart
style={chartStyle}
nrOfLevels={3}
arcsLength={arcLengths}
colors={colours}
hideText={true}
percent={gaugePerc}
arcPadding={0.05}
cornerRadius={1}
/>
</div>
The value changes from 0, to another value for example 0.7 after an API call returns some data. I'm seeing an issue where when the gauge changes to another value, the chart does not animate to it at first (it just jumps straight there), before then animating from 0 to it.
@rlaunch I had this same issue and setting animDelay to 0 solved it. Not ideal but worked for my use case so figured I'd share.
Hi @chambaz.
Thanks for sending that, it's sorted the issue for me