why633630 opened a new issue #9028: 用dataset这种方式渲染pie图时,如果name的值为数字,value会无效,渲染时用的是name的值 URL: https://github.com/apache/incubator-echarts/issues/9028 <!-- 为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。 --> ### One-line summary [问题简述] ``` option = { legend: {}, tooltip: {}, dataset: { dimension:['name','value'], source: [ ['10', 52.2], ['20', 43.3], ['30', 83.1], ['40', 86.4], ['50', 72.4] ] }, xAxis: {type: 'category'}, yAxis: {}, series: [ {type: 'pie'} ] }; ``` 通过dataset这种方式渲染pie图,如果source中第一个值(name)为数字时,pie图渲染时取得是这个name的值,而不是value ### Version & Environment [版本及环境] + ECharts version [ECharts 版本]:4.0 + Browser version [浏览器类型和版本]:版本 68.0.3440.106(正式版本) (32 位) + OS Version [操作系统类型和版本]:win7 ### Expected behaviour [期望结果] ``` dataset: { dimension:['name','value'], source: [ ['10', 52.2], ['20', 43.3], ['30', 83.1], ['40', 86.4], ['50', 72.4] ] } ``` 当dataset的name值为数字时,也能正常渲染,既渲染时获取的value的值而不是现在的name的值 ### ECharts option [ECharts配置项] <!-- Copy and paste your 'echarts option' here. --> <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] --> ```javascript option = { legend: {}, tooltip: {}, dataset: { dimension:['name','value'], source: [ ['10', 52.2], ['20', 43.3], ['30', 83.1], ['40', 86.4], ['50', 72.4] ] }, xAxis: {type: 'category'}, yAxis: {}, series: [ {type: 'pie'} ] } ``` ### Other comments [其他信息] <!-- For example: Screenshot or Online demo --> <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] --> 
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
