You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Suraj-Singhvi (via GitHub)" <gi...@apache.org> on 2023/05/31 08:12:42 UTC

[GitHub] [echarts] Suraj-Singhvi opened a new issue, #18687: [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded

Suraj-Singhvi opened a new issue, #18687:
URL: https://github.com/apache/echarts/issues/18687

   ### Version
   
   5.4.2
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/en/editor.html?c=area-pieces&code=PYBwLglsB2AEC8sDeAoWsIBMBcsDkAZgEwBsRADAQJwkC0A7ACyMCmtRLAhvbZgMYE6AVj5Eq5TiT4AjKgA4AzHgA0KNLADOLAE4QWG3AG116VOnOwwATxAtceaZ20qT5zJzCcjri4byYWAk4AVwAbMBVYAEYyEgUAOiEFZJTUhQBdVQtfPAAZTg0wWHpYdysNSIpGKiF6OXjyRqamokyfcz98wthxUs5yyqiqenoiKPj6ISiiBRIhqPT2tvaAehXYPmBgbUwIaA8WAGVysBYAW3sQYFCnF2zYAA8AQQeIA3wCAhHGTkxpWioLEwVFocii5DoLDi_yi0kYREwQgI5D4LD4UTwrgAvuo2ug1rBtL8IMENC83rgzLACegNAALYAAd1wYG0wRYWWp63Q1ls9j4BwA5tsrHcubAsZyCZxoILQixye8kJL1ASrjdtJSVepnq8la4sPZPt9fv9AcDQeDIdDaLD4Yjkaj0WLaQzmZY2RzXLy7PgBadhdpReoVegrIrvBYqRZDfhyFQFJgZojbWieNJpFFGLQBHxs4CWPQ-HwEwJpEQXeZ6UyWZ7sbiUFiANxAA
   
   ### Steps to Reproduce
   
   In the given example, the eChart would render a bar chart correctly. But when you try to comment on the `xAxis & yAxis` settings and have the settings for the Polar chart which are - `coordinate-system, radiusAxis, angleAxis, and polar`, the eChart renders an incorrect chart overlap until the RUN button is clicked again. The same issue would occur vice -versa when you have polar chart settings and then update it to have bar chart settings.and 
   
   ### Current Behavior
   
   When I have a Bar chart with x & y axis and I update the echart options to have polar chart settings, I would expect the Polar chart to be displayed but instead a weird chart is being shown.
   
   Before:
   ![image](https://github.com/apache/echarts/assets/25072841/2b16a17f-e968-4af3-b785-d63b72a4874b)
   
   After:
   ![image](https://github.com/apache/echarts/assets/25072841/777d4dd6-8c96-4fcc-af5d-161fbad73568)
   
   NOTE: Do not click the RUN button.
   
   
   
   ### Expected Behavior
   
   I would expect the chart to be updated automatically without the need to click the RUN button in this case.
   ![image](https://github.com/apache/echarts/assets/25072841/b859fe16-b8a9-4f19-aac1-7757720b8c38)
   
   As echart automatically keeps updating the options whenever the settings are updated, i would expect it will render a Polar chart instead.
   
   
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   (In my application, I am switching between different chart types like `Bar | Polar | Radar | Pie` this issue only happens while switching between Bar and Polar)


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded [echarts]

Posted by "Always-prog (via GitHub)" <gi...@apache.org>.
Always-prog commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-2302539117

   +1 here
   temporary solution is clearing chart and setting EC options
   ```
   echartInstance.clear()
   echartInstance.setOption(echartOptions)
   ```


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded [echarts]

Posted by "Tom-Yucw (via GitHub)" <gi...@apache.org>.
Tom-Yucw commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-1909251684

   I meet with the same problem.
   In a group, I draw a line, and can be switched to a bar. But when I  switch it, the connected charts showed the changed one data. So, I get 2 lines after change back.
   
   Before switch:
   ![image](https://github.com/apache/echarts/assets/93122331/c05667b6-0070-4cb2-a33c-d15eeb90ef65)
   
   Switching to bar:
   ![image](https://github.com/apache/echarts/assets/93122331/d283202b-4eb6-4d7c-87c5-18f2ae2e815d)
   
   Switch back: get 2 lines
   ![image](https://github.com/apache/echarts/assets/93122331/dc72ea70-f4bf-401f-b1f1-529deabf7e78)
   
   And I have tried to `setOption(op, true)` before connect the charts, but it did not work.
   ```
   allcharts = [];   // store all charts in this array
   ......
   // here is a loop to create charts
   {
   ......
   myChart.group = 'group1';
   **myChart.setOption(option, true);**
   allcharts.push(myChart);
   }
   ......
   echarts.connect(allcharts);  // connect all charts
   ```
   Is there something I did wrong, or any way to solve this?
   Thanks a lot!


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] elnipa commented on issue #18687: [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded

Posted by "elnipa (via GitHub)" <gi...@apache.org>.
elnipa commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-1740669230

   Any progress on this bug? Also experiencing this.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded [echarts]

Posted by "ptandler (via GitHub)" <gi...@apache.org>.
ptandler commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-1980960631

   I also tried `universalTransition:{ enabled: true },` but still same issue:
   
   I can change between bar, pie, radar, polar in any order and this works very well, but only when I change from bar to polar or polar to bar, I get these strange artifacts.
   


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] helgasoft commented on issue #18687: [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-1741305215

   A small study on **ECharts transitions**.
   Charts could be separated in two major groups - **with** (bar,line,etc.) and **without** (pie,polar,graph,etc.) **axes**.
   Transition between charts is done through [setOption](https://echarts.apache.org/en/api.html#echartsInstance.setOption) or [morphing](https://echarts.apache.org/handbook/en/basics/release-note/5-2-0).
   1) setOption offers _merge_ or _replace_ modes. Merge is used primarily for updating existing elements.
   Merging charts between the two major groups will not go well because they are very different in nature. Issues here cannot be called bugs since chart designs are incompatible and do not allow merging.
   Transitions between major groups should be done by **replace** - ```setOption(op, true)```.
   2) Morphing is an animated transition between two chart's data items. Data structure is important here and there are two types - continuous(value) and categorical **data**. We can morph between the major groups if data is of the same type. For instance a value-data pie to a value-data bar chart will work. But the same pie to categorical bars will not.
   
   So keep in mind those important chart and data distinctions when transitioning.
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded [echarts]

Posted by "ptandler (via GitHub)" <gi...@apache.org>.
ptandler commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-1980946259

   right, `setOptions(opts, true)` (i.e. _replace_ mode) does not fix this.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-5458314674

   This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] helgasoft commented on issue #18687: [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-1571099369

   yes, something fishy going on. Chart cannot be updated between bar and polar, but can be **replaced**. And only after adding a _series.id_. Weird...
   [Demo Code](https://echarts.apache.org/examples/en/editor.html?c=area-pieces&code=M7AEF5QbQKFUDed6gC4E8AOBTAXKAcgCMBDAJwIBpl4ATE1E_WFFKA27AMxIFcAbVFVABGAGwAmMQGYAdAFZpS5SukBdaq3jsAMiWCpQAdlD10wYRIAMAFgCc8owA5ZVt-_cSNNNgT0HQOytTEnNLETsjIwkRWSN5EQlpMQiRNR90-ABfGDUAbhgAe0xUAEtCgDsRCERkMtR-PERUbAAPVHwCAGN-Uq6Aa1BK0C6AC3JDVEK0QoBzWcaCLM1QYGwyUuxgfBAV1oBBVtLtxDQsJu6GbFnCsnQCUGXkdEPj_AQcrILissrYtY2WygVjUsi6hVutFKFSuAGVzC0ALY1S5kFrAUokCoSWgEb4lcrYmpIeAAzYnbBjCbAWS8Mr8MH8SrYAAUIAAlCssQtsK8Th8VmQSFDeMA-e8zjhOl0rjc7g8nvBMIV-OR3p98b8qrIyUCQbJSrQUV0JHj4AB6c2gIi8WagADupVQo0KdLQo2OoF6FWwRQJlQkOvW5OBoPBkOhcIR2GRkAIytVFAKMER6AAwuM0UHUAB5f0VFk_QkidkFVALGo8fhrAqpjMTWSVFndXoDYQs9kQAB8tXgdczqGzea1LJZ5f4nYA_EN89V8EWA5Q0GReNhS6A6hXIABCccFLKloA).
   
   > I would expect the chart to be updated automatically without the need to click the RUN button
   
   In many cases this is an incorrect assumption.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18687:
URL: https://github.com/apache/echarts/issues/18687#issuecomment-5375422592

   This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded [echarts]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #18687: [Bug] On Switching between the Bar and Polar chart dynamically, weird chart is rendered until reloaded
URL: https://github.com/apache/echarts/issues/18687


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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