You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a component that uses Echarts for representing histograms based on numeric fields in documents (duration field). I receive the results of the query in the onData handler, but I cannot update the Echart option to refresh the chart. I am using echarts-for-react. Any idea how to do this? Thank you,
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I have a component that uses Echarts for representing histograms based on numeric fields in documents (duration field). I receive the results of the query in the onData handler, but I cannot update the Echart option to refresh the chart. I am using echarts-for-react. Any idea how to do this? Thank you,
<ReactiveComponent
componentId="durationChart"
showFilter
defaultQuery={() => ({
"query": {
"exists" : { "field" : "duration" }
}
})
}
render={({ error, loading, data, value, setQuery }) => {
if (data != null) {
option["xAxis"]["data"] = jp.query(data, '$..event')
option["series"]["data"] = jp.query(data, '$..duration')
console.log("data change: "+jp.query(data, '$..duration'))
console.log(option)
}
return ;
}}
>
Beta Was this translation helpful? Give feedback.
All reactions