未验证 提交 23596acc 编写于 作者: Y Yi Shen 提交者: GitHub

Merge pull request #11849 from susiwen8/#7533

Fix dataview show NaN when user use dataset
......@@ -93,7 +93,8 @@ function assembleSeriesWithCategoryAxis(series) {
}));
var columns = [categoryAxis.model.getCategories()];
zrUtil.each(group.series, function (series) {
columns.push(series.getRawData().mapArray(valueAxisDim, function (val) {
var rawData = series.getRawData();
columns.push(series.getRawData().mapArray(rawData.mapDimension(valueAxisDim), function (val) {
return val;
}));
});
......
......@@ -57,6 +57,7 @@ under the License.
<div id="layout9"></div>
<div id="layout10"></div>
<div id="layout11"></div>
<div id="layout12"></div>
......@@ -884,11 +885,38 @@ under the License.
});
</script>
<script>
require(['echarts'], function (echarts) {
var option = {
dataset: {
source: [
['product', '2015', '2016', '2017'],
['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: {},
series: [
{type: 'bar'},
{type: 'bar'},
{type: 'bar'}
],
toolbox: {
feature: {
dataView: {}
}
}
}
testHelper.create(echarts, 'layout12', {
option: option,
dataTable: option.dataset.source
});
});
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册