Created
January 22, 2020 12:56
-
-
Save windate3411/03a7e202615134ad263f6938dc4b345d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/components/BarChart.vue | |
<script> | |
import { Bar } from 'vue-chartjs' | |
export default { | |
extends: Bar, | |
mounted() { | |
this.renderChart({ | |
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], | |
datasets: [ | |
{ | |
label: 'GitHub Commits', | |
backgroundColor: '#f87979', | |
data: [40, 20, 12, 39, 10, 40, 39, 80, 40, 20, 12, 11] | |
} | |
] | |
}) | |
} | |
} | |
</script> | |
src/App.vue | |
<div class="col-md-5 mr-2"> | |
<div class="card h-100"> | |
<BarChart /> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment