Skip to content
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

Passing the data from vue to chartjs #125

Closed
alokpandeyrc opened this issue Jun 21, 2017 · 0 comments
Closed

Passing the data from vue to chartjs #125

alokpandeyrc opened this issue Jun 21, 2017 · 0 comments

Comments

@alokpandeyrc
Copy link

Passing the data from vue:-
<Mix-Chartss :data={labels: ['January', 'February'],
datasets: [
{
label: 'GitHub Commits',
backgroundColor: '#f87979',
data: [40, 20]
}
]}>

-Mixchartss.js file:-

import { Bar } from 'vue-chartjs'
export default Bar.extend({
props: ['data'],
mounted () {
this.renderChart(this.data)
}
})

Environment

  • vue.js version: <2.8.2>
  • vue-chart.js version:
  • npm version:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant