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

生成图表报错 #8167

Closed
penxu opened this issue Apr 16, 2018 · 3 comments
Closed

生成图表报错 #8167

penxu opened this issue Apr 16, 2018 · 3 comments

Comments

@penxu
Copy link

penxu commented Apr 16, 2018

One-line summary [问题简述]

生成柱状图有错, 把series里的

'label': {
   'show': true,
  'position': 'top'
 },

的show 设为false, 就正常,不会报错。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:
    chorme
    v4.0.4
    windows 7

Expected behaviour [期望结果]

正常生成图表

ECharts option [ECharts配置项]

option = {
          let option0 = {
            'backgroundColor': this.dashBoardData.chart_bgcolor,
            'color': this.dashBoardData.chart_color,
            'tooltip': {
              'trigger': 'axis',
              'axisPointer': {
                'type': 'shadow'
              }
            },
            'legend': {
              'left': 'left'
            },
            'xAxis': [
              {
                'type': 'category',
                'data': ['列1', '列2', '列3', '列4', '列5', '列6'],
                'axisLine': {
                  'show': true
                },
                'axisTick': {
                  'show': true
                }
              }
            ],
            'yAxis': {},
            'series': [
              {
                'data': [5, 20, 36, 10, 15, 20],
                'name': '数值',
                'type': 'bar',
                'label': {
                  'show': true,
                  'position': 'top'
                },
                'barMaxWidth': 50,
                'barMinHeight': 5
              }
            ]
          }
}

Other comments [其他信息]

yxy7 sx 7ws ou 02 in o

@pissang
Copy link
Contributor

pissang commented Apr 18, 2018

#7947 ,最新代码中已修复

@pissang pissang closed this as completed Apr 18, 2018
@penxu
Copy link
Author

penxu commented Apr 19, 2018

并没有解决,label设置显示的时候,直接报错,图表生成不了。label设置不显示的时候,就能正常生成。

@Adelaide1014
Copy link

这段代码报错是因为,是因为多嵌套了一层option吧,

option = {
          let option0 = {
}
}

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