Skip to content

设置图表配置项legend不会显示 #88

@huangche007

Description

@huangche007

initChart(canvas, width, height) { let chart = null; chart = echarts.init(canvas, null, { width: width, height: height }); var option = { tooltip: { trigger: 'item', formatter: '{a} <br/>{b}: {c} ({d}%)' }, legend: { orient: 'vertical', right: 10, top: 20, bottom: 20, data: ['联盟广告', '视频广告', '搜索引擎'] }, series: [ { name: '访问涞源', type: 'pie', radius: ['50%', '70%'], avoidLabelOverlap: false, label: { show: false, position: 'center' }, emphasis: { label: { show: true, fontSize: '30', fontWeight: 'bold' } }, labelLine: { show: true }, data: [ {value: 234, name: '联盟广告'}, {value: 135, name: '视频广告'}, {value: 1548, name: '搜索引擎'} ] } ] }; chart.setOption(option) return chart; // 返回 chart 后可以自动绑定触摸操作 },
发现配置的legend显示不出来,"mpvue-echarts": "^0.2.7"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions