echarts icon indicating copy to clipboard operation
echarts copied to clipboard

legend不显示

Open erguotou520 opened this issue 9 years ago • 2 comments

tips

已解决,是缺少legend模块的原因

One-line summary [问题简述]

我在vue2中结合echarts写的组件EcharBar.vue

我在组件中传的option中包含 legend,但是页面中就是不显示 image 但我把我的option复制到官网example中确实有 legend

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.3.2
  • Browser version [浏览器类型和版本]: Chrome
  • OS Version [操作系统类型和版本]: Win10

Expected behaviour [期望结果]

展示出legend

ECharts option [ECharts配置项]

option = {
  {
  "title": {
    "text": "CPU使用率"
  },
  "tooltip": {
    "trigger": "axis"
  },
  "legend": {
    "data": [
      "CPU使用率"
    ]
  },
  "xAxis": {
    "type": "category",
    "boundaryGap": false,
    "data": [
      "2005-02-25 10:58:43",
      "2010-02-06 11:07:03",
      "2001-11-10 11:35:42",
      "1985-05-17 00:02:32",
      "2004-07-10 04:53:56",
      "1992-05-04 00:56:21",
      "2004-02-27 03:12:20"
    ]
  },
  "yAxis": {
    "type": "value",
    "max": 100,
    "axisLabel": {
      "formatter": "{value} %"
    }
  },
  "series": [
    {
      "name": "CPU使用率",
      "type": "line",
      "data": [
        16,
        73,
        70,
        64,
        49,
        71,
        51
      ]
    }
  ]
}

erguotou520 avatar Dec 09 '16 08:12 erguotou520

how to add legent model

geekSnails avatar Mar 16 '18 03:03 geekSnails

我也遇到这种问题了,把echarts版本降为3.3.2可以解决问题吗

QinZonger avatar Nov 21 '18 03:11 QinZonger