chudur-budur opened a new issue #13336:
URL: https://github.com/apache/incubator-echarts/issues/13336


   ### Version
   4.9.0
   
   ### Reproduction link
   
[https://jsfiddle.net/ramgorur/cfor274e/latest](https://jsfiddle.net/ramgorur/cfor274e/latest)
   
   ### Steps to reproduce
   Just follow the [`JSFiddle 
link`](https://jsfiddle.net/ramgorur/cfor274e/latest) and run the code. No 
setup necessary.
   
   ### What is expected?
   If the `parallelAxis` and `series` are modified in `option` on the fly, the 
axes and the data should change accordingly.
   
   ### What is actually happening?
   Let's say I have a parallel plot of 4-dimensional data. The `option` is like 
this:
   ```javascript
   var option = { parallelAxis: null, series: null };
   
   var myChart = echarts.init(document.getElementById("plot"));
   
   option.parallelAxis = [
           { dim: 0, name: "f1" }, 
           { dim: 1, name: "f2" }, 
           { dim: 2, name: "f3" }, 
           { dim: 3, name: "f4" }
       ];
   option.series = [{
           data: data_4d,
           lineStyle: { color: "red" },
           name: "data_4d",
           type: "parallel"
       }];
   
   myChart.setOption(option);
   ```
   <img 
src="https://i.postimg.cc/hGpQ05dk/Screen-Shot-2020-09-23-at-9-24-38-PM.png"; 
width="400px"/>
   
   Now, if I change the option with different data and axes, like this:
   ```javascript
   var opt = myChart.getOption();
   opt.parallelAxes = [
       { dim: 0, name: "f1" }, 
       { dim: 1, name: "f2"}, 
       { dim: 2, name: "f3"}
   ];
   opt.series = [{
       data: data_3d,
       lineStyle: { color: "red" },
       name: "data_3d",
       type: "parallel"
   }];
   myChart.setOption(opt);
   ```
   The last axis still stays in the plot. 
   
   <img 
src="https://i.postimg.cc/tgXVWjYd/Screen-Shot-2020-09-23-at-9-24-57-PM.png"; 
width="400px"/>
   
   **Please note:** In the case of parallel and scatter plots, there are many 
options that can't be modified on the fly. 
   ---
   Not sure if this is a bug or I'm not doing it in a correct way
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to