Skip to content
Advertisement

Image with dynamic data vuejs and chart.js

I have this code to show bar-chart with VueJS:

JavaScript

Method in VueJS

JavaScript

This code show this bar chart: enter image description here

But I need replace in my code two variables dynamic:

labels: [‘MICROFINANZAS -SECTOR COMERCIO’,’MICROFINANZAS -SECTOR SERVICIOS’],

data: [15000, 71700]

With the information of method getDeudas()

How can to made this action?

Advertisement

Answer

This is the solution, I use props and watch:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement