Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Chart data and options can't be dynamic updated #25

Open
maurodx opened this issue Nov 24, 2020 · 1 comment
Open

Chart data and options can't be dynamic updated #25

maurodx opened this issue Nov 24, 2020 · 1 comment

Comments

@maurodx
Copy link

maurodx commented Nov 24, 2020

I'm trying to generate barchart from a json axios response. I've called axios during mounted() hook but chart is not generated.
SVG contains some elements but it's width is 0px.

I've changed chart_data and chart_options elements inside axios response promise.

@Saigesp
Copy link
Owner

Saigesp commented Jan 12, 2021

Hi @maurodx, thanks for the report, and sorry for my late response.

The charts need the wrapper element to have a preset space to calculate the position of the bars/dots. Try forcing the container space with style="width: 100%" or similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants