How to hanlde async data? #668
Unanswered
BenJackGill
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I do not know how to handle async data with vue eCharts.
I have looked through the examples and I still can't figure it out.
Can anyone take a look at this SFC and tell me how to update the
data
value?Currently the
gaugeData
array loads with a value of0
and stays that way even thoughprops.totalScore
gets updated with a new value.EDIT UPDATE:
I can now get the chart to load correctly using another
ref
and awatch
of the props.But when the props change it draws a new number ON TOP of the old one. But I need it to replace the old number.
See here how it looks on page load (this is correct):
And see here how it looks when I try to change the
gaugeDataRef
value (this is wrong, the value is drawn on top of the old one):Here is the updated code:
Beta Was this translation helpful? Give feedback.
All reactions