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
The function getHideVals() creates an array of strings based on this.state.
When a state change is triggered and state.points is updated, the data in the chart is updated no problem. But when getHideVals() returns a new value, the new hide states of the data are not reflected. Whatever values for data to hide are originally passed in when the webpage is first rendered persist. I can't figure out how to get changes to the data.hide prop to display.
The text was updated successfully, but these errors were encountered:
After some experimentation I've figured out this is a problem with c3 itself. It looks like only certain fields of the data object can be controlled by passing them into the load() function via a data object, and some must use the API. Hiding/showing data has an API call.
So I have a chart on a webpage. The data prop for the chart is composed within the react render function, like so:
The function
getHideVals()
creates an array of strings based onthis.state
.When a state change is triggered and
state.points
is updated, the data in the chart is updated no problem. But whengetHideVals()
returns a new value, the new hide states of the data are not reflected. Whatever values for data to hide are originally passed in when the webpage is first rendered persist. I can't figure out how to get changes to thedata.hide
prop to display.The text was updated successfully, but these errors were encountered: