Figured it out.
In vue-chartist, the install function (called at Vue.use(vue-chartist)) defines a global Vue component called ‘Chartist’. Importing it in each file overwrites this definition and causes the error I was having.
Edit the ‘chartist.js’ boot file to read:
import Vue from 'vue';
import vue_chartist from 'vue-chartist';
import 'app/node_modules/chartist/dist/chartist.min.css';
Vue.use(vue_chartist)
And edit my vue component file to read:
<template>
<q-page class="column flex flex-center">
<div class="text-h5 text-uppercase text-primary "></div>
<chartist
style="width:200px; height:200px"
type="Line"
:data="chartData"
:options="chartOptions"
ratio="ct-major-second"
></chartist>
</q-page>
</template>
<script>
export default {
name: 'Product',
data() {
return {
chartData: {
labels: ['A', 'B', 'C'],
series: [
[1, 3, 2],
[4, 6, 5]
]
},
chartOptions: {
lineSmooth: false
}
};
}
}
</script>
It works now