codecamp

ECharts图例组件配置 格式化文本

legend.formatter   |   string, Function

[ default: null ]

用来格式化图例文本,支持字符串模板和回调函数两种形式。

示例:

// 使用字符串模板,模板变量为图例名称 {name}
formatter: 'Legend {name}'
// 使用回调函数
formatter: function (name) {
    return 'Legend ' + name;
}
ECharts图例组件配置 内边距与间隔
ECharts图例组件配置 状态显示
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定