Property height is not reactive
Closed this issue · 3 comments
ace-han commented
It seems height
is not synced when viewport
resized.
https://codepen.io/ace-han/pen/mdOeVwM
Below is a screen capture when the window resized
xr0master commented
Hey.
I'm not sure why this should be in sync? This works like any HTML element. If you prefer to work with inline styles, then don't use the attributes.
ace-han commented
I'm not sure why this should be in sync?
height
is a reactive attribute that got passed along(from parent component to children).
From browser devtool, say,
height=10
at t0
,
then click the button to change, say,
height=100
at t1
,
You will see that , <canvas height={h1} .... style="...; height: {h2}" />
- Sometimes
h1
change to100
and then back to10
in a blink (short time), henceheight
is NOT reactive - Sometimes
h1
did change to100
, which(h1=100) != (h2=10)
, then<canvas />
fails to display just like the screen capture above. If aresize
happen after then,<canvas />
will display withh1=h2=100
appropriately
xr0master commented
I suggest you open a ticket in the Chart.js repository. This issue does not apply to the chart.js wrapper.