C
C
codeZlo2018-10-31 15:00:31
Vue.js
codeZlo, 2018-10-31 15:00:31

What is wrong with vue-chartist?

<template>
    <vue-chartist :data="data" :options="options" type="Line"></vue-chartist>
</template>
<script>
  import { mapGetters, mapActions } from 'vuex'
  import * as VueChartist from 'v-chartist'

  export default {
    name: 'XXXname',
    components: {
      'vue-chartist': VueChartist
    },
    data() {
        data: {
           series: [
                [1]
           ]
        },
        options: {
           width: "490px",
           height: "240px",
           low: 1,
           showArea: true,
           fullWidth: true,
           lineSmooth: VueChartist.Interpolation.simple()
        }
      }
    }
</script>

Because of the lineSmooth: VueChartist.Interpolation.simple() in the properties, the chart stops working :( Please help me, what is the error? Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-07-12
@codeZlo

This is just a component that draws a chart; it does not provide access to the chartist API. So you need to import chartist separately: Accordingly, instead of https://codesandbox.io/s/vue-template-uh9j2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question