Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needle shows current value before animating to it from 0 #112

Open
rlaunch opened this issue Nov 2, 2022 · 2 comments
Open

Needle shows current value before animating to it from 0 #112

rlaunch opened this issue Nov 2, 2022 · 2 comments

Comments

@rlaunch
Copy link

rlaunch commented Nov 2, 2022

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.

See GIF of the issue

@chambaz
Copy link

chambaz commented Nov 9, 2022

@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.

@rlaunch
Copy link
Author

rlaunch commented Dec 22, 2022

Hi @chambaz.

Thanks for sending that, it's sorted the issue for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants