QingWei-Li/vue-trend

Documentation code doesn't work.

hackuun opened this issue · 1 comments

I copypaste this code and got empty page. Why it is not working? Using vie-cli webpack starter.

<template>
  <div>
    <trend
      :data="[0, 2, 5, 9, 5, 10, 3, 5, 0, 0, 1, 8, 2, 9, 0]"
      :gradient="['#6fa8dc', '#42b983', '#2c3e50']"
      auto-draw
      smooth>
    </trend>
    <p>hello</p>
  </div>
</template>

<script>
import Vue from 'vue'
import Trend from 'vuetrend'

Vue.use(Trend)
</script>

Ok, I got it work with this. Is this right use?

import Vue from 'vue'
import Trend from 'vuetrend'

export default {
  components: {
    Trend
  }
}