We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
| Executable | Version | | node --version | v8.11.1 | | nodeppt -v | 2.1.8 |
node --version
nodeppt -v
| OS | Version | | macOS Sierra | 10.15.1 | | chrome | 78.0|
描述:在echarts中的formatter仅支持字符串模版,如果使用函数则不生效
如下代码
series: [{ name: '1.0', type: 'bar', label: { show: true, formatter: function(params) { if (params.data === 0) { return '' } else { return params.seriesName } } }, stack: '版本', xAxisIndex: 0, yAxisIndex: 0, itemStyle: { normal: { barBorderRadius: [0, 0, 0, 0], color: '#005dff' } }, barWidth: 20, data: [0,2,6,0,9,9,0,5,1,1], zlevel: 11 }]
如果使用字符串模版就可以,比如formatter: '{a}'就可以正常显示
formatter: '{a}'
但我现在的需求其实是,当数据为0的时候就不显示,如果有数据就显示出name
name
The text was updated successfully, but these errors were encountered:
目前的实现,echarts配置里面是不支持function的
function
Sorry, something went wrong.
如何让其支持 function ? 换到高版本echart?还是用完全版cdn解析?
No branches or pull requests
| Executable | Version |
|
node --version
| v8.11.1 ||
nodeppt -v
| 2.1.8 || OS | Version |
| macOS Sierra | 10.15.1 |
| chrome | 78.0|
描述:在echarts中的formatter仅支持字符串模版,如果使用函数则不生效
如下代码
如果使用字符串模版就可以,比如
formatter: '{a}'
就可以正常显示但我现在的需求其实是,当数据为0的时候就不显示,如果有数据就显示出
name
The text was updated successfully, but these errors were encountered: