Files
manja_ui_dev/src/views/dashboard/CardLine3ChartExample.vue
T
2018-11-23 15:26:30 +01:00

54 lines
1.1 KiB
Vue

<script>
import { Line } from '@coreui/vue/src/extends/BaseCharts'
import { CustomTooltips } from '@coreui/coreui-plugin-chartjs-custom-tooltips'
export default {
extends: Line,
props: ['height', 'width'],
mounted () {
const datasets3 = [
{
label: 'My First dataset',
backgroundColor: 'rgba(255,255,255,.2)',
borderColor: 'rgba(255,255,255,.55)',
data: [78, 81, 80, 45, 34, 12, 40]
}
]
this.renderChart(
{
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: datasets3
},
{
tooltips: {
enabled: false,
custom: CustomTooltips
},
maintainAspectRatio: false,
legend: {
display: false
},
scales: {
xAxes: [{
display: false
}],
yAxes: [{
display: false
}]
},
elements: {
line: {
borderWidth: 2
},
point: {
radius: 0,
hitRadius: 10,
hoverRadius: 4
}
}
}
)
}
}
</script>