-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New regions are not rendered when updating props #18
Comments
Potentially related to c3js/c3#1527. |
I found a quick workaround for a demo. Until c3 fixes this on their end, this will at least cause the regions to update as expected.
|
The c3 docs state that calling http://c3js.org/reference.html#api-unload
I haven't tested this yet, but I think what should be done instead is pass http://c3js.org/reference.html#api-load
Hence it should work like this:
|
I'm not using regions, so I'm not sure if my changes fix that. However I did verify that using load with |
Seems like unlike properties like
axis
andgrid
, changingregions
neither removes any previous regions that were drawn the first time the C3Chart component was rendered nor renders the new ones.Adding
this.chart.regions.remove()
tocomponentWillUpdateProps
removes the regions but then new regions that are specified are not redrawn when C3Chart is re-rendered.In a perhaps related observation, passing the
unloadBeforeLoad
prop doesn't seem to work for me...rendering seems unpredictable.The text was updated successfully, but these errors were encountered: