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
中文的label:高,中,低等不显示,类似上一个issue。 测试地址:http://echarts.baidu.com/demo.html#gauge
option = { tooltip : { formatter: "{a} <br/>{b} : {c}%" }, toolbox: { feature: { restore: {}, saveAsImage: {} } }, series: [ { name: '业务指标', type: 'gauge', detail: {formatter:'{value}'}, min:0, max:950, axisLabel: { // 坐标轴文本标签,详见axis.axisLabel show: true, formatter: function(v){ switch (v+''){ case '100': return '弱'; case '300': return '低'; case '600': return '中'; case '900': return '高'; default: return ''; } }, textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#333' } }, data: [{value: 50, name: '数值'}] } ] }; app.timeTicket = setInterval(function () { option.series[0].data[0].value = (Math.random() * 950).toFixed(2) - 0; myChart.setOption(option, true); },2000);
希望达到的效果:http://echarts.baidu.com/echarts2/doc/example/gauge.html
option = { tooltip : { formatter: "{a} <br/>{b} : {c}%" }, toolbox: { feature: { restore: {}, saveAsImage: {} } }, series: [ { name: '业务指标', type: 'gauge', detail: {formatter:'{value}'}, min:0, max:950, axisLabel: { // 坐标轴文本标签,详见axis.axisLabel show: true, formatter: function(v){ switch (v+''){ case '100': return '弱'; case '300': return '低'; case '600': return '中'; case '900': return '高'; default: return ''; } }, textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE color: '#333' } }, data: [{value: 50, name: '数值'}] } ] }
The text was updated successfully, but these errors were encountered:
formatter: function(v){ switch (v+''){ case '100': return '弱'; case '300': return '低'; case '600': return '中'; case '900': return '高'; default: return ''; } }
这里面 v 不一定正好是 100 300 600 900. console.log 打出 v 看看就知道了。
100
300
600
900
console.log
v
Sorry, something went wrong.
No branches or pull requests
问题简述 (One-line summary)
中文的label:高,中,低等不显示,类似上一个issue。
测试地址:http://echarts.baidu.com/demo.html#gauge
版本及环境 (Version & Environment)
重现步骤 (Steps to reproduce)
期望结果 (Expected behaviour)
希望达到的效果:http://echarts.baidu.com/echarts2/doc/example/gauge.html
可能哪里有问题 (What went wrong)
ECharts配置项 (ECharts option)
其他信息 (Other comments)
The text was updated successfully, but these errors were encountered: