MonsterGene opened a new issue #10494: 使用dataset时, 系列名为纯数字时出现报错 URL: https://github.com/apache/incubator-echarts/issues/10494 使用echart版本: 4.2.0 Chrome版本: 74.0(32位) 相信与版本无关。 当数据为如下样子时, 会报下面的错误: ``` dataset: { source: [ ["value","8","9","10","11","12", '13', '14', '15', '16', '17', '18'], [0.057,0,0,0,0,0,0,0,0,0,0,0], [0.076,2,11,12,25,40,49,38,42,61,62,37], [0.095,0,1,1,3,8,5,7,9,11,8,7], [0.114,0,1,3,2,3,5,6,7,9,8,5], ] } ``` 报错信息: TypeError: Cannot read property 'width' of undefined 查看源代码,报错位置如下: ``` // In case width or height are too small. function getLineWidth(itemModel, rawLayout) { var lineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0; return Math.min(lineWidth, Math.abs(rawLayout.width), Math.abs(rawLayout.height)); } ``` 报错情况: 当数据系列小于等于5时,显示没有问题,大于5个就会出现上面的报错。系列大于五个时,系列名必须为字母开头的字符串才不会报错。 此问题也有其他人提交过,希望echarts开发团队尽快修复bug。 希望尽快得到得到官方的解释或者修复bug,谢谢。
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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]
