Open
Description
Description
The X axis labels jump while a value update is animated if additionalOptions
is defined, even if the options object is empty. The labels stay in their place during animation if there is no additionalOptions
.
Screen.Recording.2024-09-05.at.15.05.11.mov
I've increased the Charts font size to 18px
in the video to make the effect easier to see but the jumping also happens with default styles.
Expected outcome
No jumping labels
Minimal reproducible example
import { useSignal } from "@vaadin/hilla-react-signals";
import { Button } from "@vaadin/react-components";
import { Chart, ChartSeries } from "@vaadin/react-components-pro";
export default function Test() {
const value = useSignal(3);
return <>
<Button onClick={() => value.value++}>Update value</Button>
<Chart categories={["A", "B"]} additionalOptions={{}}>
<ChartSeries values={[0, value.value]} />
</Chart>
</>
}
Steps to reproduce
- Click the button and notice how the x axis labels jump while animating
- Change the code to remove the empty
additionalOptions
object - Click the button and notice that the labels no longer jump around
Environment
Vaadin 24.5.0.alpha13
Browsers
No response