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
Is it possible to use with axios? #103
Comments
Hey @altcointrading yes, it is working with axios and apis. I guess it is working on your local dev environment, because the fetch of your json is fast enough to finish, before the chart get's drawn. However, the mixin will never trigger! Because if you take a look in the docs the mixin will create a prop named Try to change it to I don't know that you're planning, but you don't nessasary need the reactive prop. It is only usefull, if you plan to change the data, while the chart is rendered. Like updating the data. If you only want to fetch some data and then render the chart, you can simply use a Make a new data model And then just add the |
Hi @apertureless - thanks a lot. It seems the charting I need is a bit too much anyway so I'll be looking for another way but for the meantime with small amount of data points i got it working with
which switsches to true when data is processed, and
Cheers! |
useful |
Expected Behavior
Chart to be rendered with data coming via axios get request
Actual Behavior
Chart is rendered before data arrives, in spite of importing the reactive mixin chart never gets updated.
I am importing vue-chartjs in a component like so
This component then is imported into another component that gets the actual data from an API. In dev mode the chart does get drawn, however when I build the app for static hosting the problem appears.
Environment
The text was updated successfully, but these errors were encountered: