Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import 问题会出现 Cannot read property 'extendSeriesModel' of undefined #29

Closed
xuhuihui opened this issue Sep 28, 2017 · 3 comments

Comments

@xuhuihui
Copy link

<template>
  <div class="water">
    <!-- <chart :options="option" auto-resize></chart> -->
    <div id="1" class ="water-body"></div>
  </div>
</template>
<style lang="scss">
.water {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  &-body {
    width: 100%;
    height: 100%;
  }
}
</style>
<script>
var echarts = require('echarts')
// import './echarts-liquidfill.js'
require('./echarts-liquidfill.js')
export default {
  name: 'b-water',
  data () {
    return {
    }
  },
  methods: {
    draw () {
      let id = '1'
      var chart = echarts.init(document.getElementById('' + id))
      let option = {
        series: [{
          type: 'liquidFill',
          // radius: '80%',
          data: [0.5, 0.45, 0.4, 0.3],
          // label: {
          //   normal: {
          //     // textStyle: {
          //     color: 'red',
          //     insideColor: 'yellow',
          //     fontSize: 40
          //     // }
          //   }
          // }
        }]
      }
      chart.setOption(option)
    }
  },
  mounted () {
    this.draw()
  }
}
</script>
@xuhuihui xuhuihui changed the title import import 问题会出现 Cannot read property 'extendSeriesModel' of undefined Sep 28, 2017
@xuhuihui
Copy link
Author

image

@Ovilia
Copy link
Member

Ovilia commented Sep 28, 2017

console.log(echart) 看看是不是 ECharts 没加载成功

@Ovilia Ovilia closed this as completed Nov 30, 2017
@Matthrews
Copy link

官网有这么有句话

NOTE:

echarts-wordcloud@2 is for echarts@5 echarts-wordcloud@1 is for echarts@4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants