Add LineChart Example component

This commit is contained in:
Jakub Juszczak
2016-06-26 15:46:19 +02:00
parent fde877e49f
commit 5b704cc739
2 changed files with 19 additions and 1 deletions

View File

@@ -1,14 +1,16 @@
<template> <template>
<div class="container"> <div class="container">
<bar-example :width="100" :height="200" :player={wins:'12'} :opponent={wins:'23'}></bar-example> <bar-example :width="100" :height="200" :player={wins:'12'} :opponent={wins:'23'}></bar-example>
<line-example></line-example>
</div> </div>
</template> </template>
<script> <script>
import BarExample from './examples/BarExample' import BarExample from './examples/BarExample'
import LineExample from './examples/LineExample'
export default { export default {
components: { BarExample } components: { BarExample, LineExample }
} }
</script> </script>

View File

@@ -0,0 +1,16 @@
import LineChart from '../BaseCharts/Line'
export default LineChart.extend({
ready () {
this.render({
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label: 'Data One',
backgroundColor: '#f87979',
data: [40, 39, 10, 40, 39, 80, 40]
}
]
})
}
})