-
Notifications
You must be signed in to change notification settings - Fork 19.6k
New issue
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
Dataset的dimensions存在'0',无法正常工作,图表报错 #9363
Dataset的dimensions存在'0',无法正常工作,图表报错 #9363
Comments
http://echarts.baidu.com/option.html#dataset.dimensions 参考 dimensions 文档里,可以设置字段类型,“0” 这样的可能会被自动识别成数字 |
我换成这种写法可以了: option = {
legend: {},
tooltip: {},
dataset: {
dimensions: ['product', {displayName: '0'}, '2', '3'],
source: [
['Matcha Latte', 43.3, 85.8, 93.7],
['Milk Tea', 83.1, 73.4, 55.1],
['Cheese Cocoa', 86.4, 65.2, 82.5],
['Walnut Brownie', 72.4, 53.9, 39.1]
]
},
xAxis: {type: 'category'},
yAxis: {},
// Declare several bar series, each will be mapped
// to a column of dataset.source by default.
series: [
{type: 'bar'},
{type: 'bar'},
{type: 'bar'}
]
}; 你说的dimensions中的type我理解是指定dataset中data的数据类型的。目前这个问题是维度名称中出现'0',js就会报错,换成'1'都是可以正常展示的。 |
@pissang 大哥,修复了没,我也遇到了 啊! |
很耽误事,维度为啥不是自动为 string |
三万颗星,如此严重的故障,到现在还没修复, http://echarts.baidu.com/option.html#dataset.dimensions 参考 dimensions 文档里,可以设置字段类型,“0” 这样的可能会被自动识别成数字 这个说实话也看不懂,这么坑,文档还不好理解 |
* 'master' of https://github.com/apache/incubator-echarts: typo backward compat when dim is a number-like string. fix #9363
One-line summary [问题简述]
将官方提供的demo中的
source
中的2015修改为0,控制台报错,无法正常绘制图表Version & Environment [版本及环境]
Expected behaviour [期望结果]
正常工作
ECharts option [ECharts配置项]
Other comments [其他信息]
The text was updated successfully, but these errors were encountered: