100pah commented on a change in pull request #11849:
URL: 
https://github.com/apache/incubator-echarts/pull/11849#discussion_r412410718



##########
File path: src/component/toolbox/feature/DataView.js
##########
@@ -93,7 +93,10 @@ function assembleSeriesWithCategoryAxis(series) {
         }));
         var columns = [categoryAxis.model.getCategories()];
         zrUtil.each(group.series, function (series) {
-            columns.push(series.getRawData().mapArray(valueAxisDim, function 
(val) {
+            // Using `series.name` as dimension when dataset is being used.
+            
columns.push(series.getRawData().mapArray(series.dependentModels.dataset.length
+                ? series.name
+                : valueAxisDim, function (val) {

Review comment:
       `series.name` happens to be the dimension name in this case but does not 
necessarily always be dimension name.
   And I think the indent (`, function (val) { ... `) is not good.
   
   I think a simple fix of the issue could be:
   ```js
   var rawData = series.getRawData();
   columns.push(rawData.mapArray(rawData.mapDimension(valueAxisDim), function 
(val) {
       return val;
   }));
   ```
   




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to