echarts icon indicating copy to clipboard operation
echarts copied to clipboard

feat: allow closing a curve on polar line series

Open yassilah opened this issue 3 years ago • 4 comments

Brief Information

This pull request is in the type of:

  • [ ] bug fixing
  • [x] new feature
  • [ ] others

What does this PR do?

This PR allows to close a curve on a line series with a polar coord system.

Fixed issues

Details

Before: What was the problem?

Capture d’écran 2022-10-01 à 16 08 48

After: How does it behave after the fixing?

Capture d’écran 2022-10-01 à 16 08 53

Document Info

One of the following should be checked.

  • [ ] This PR doesn't relate to document changes
  • [x] The document should be updated later
  • [x] The document changes have been made in apache/echarts-doc

Misc

ZRender Changes

  • [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

  • [x] Please squash the commits into a single one when merging.

Other information

yassilah avatar Oct 01 '22 14:10 yassilah

Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the PR: awaiting doc label.

echarts-bot[bot] avatar Oct 01 '22 14:10 echarts-bot[bot]

hi! sorry for the delay but I finally added some tests, they did help in avoiding some issues and avoiding code repetition so I hope it's enough :)

yassilah avatar Nov 23 '22 09:11 yassilah

Hi, is there anything else I can do to get this PR merged?

yassilah avatar Sep 10 '23 17:09 yassilah

Hi! So I got rid of the loop implementation for ECPolyline, which will use the ECPolygon buildPath method when loop: true instead. I tried to get rid of the getPoints function entirely and instead implement the logic in drawSegment directly to avoid unnecessary array manipulation but I actually can't because I still need it to work when smooth: true. So, instead I added a check to see whether the extra before/after points were necessary (when both loop and smooth are truthy), which should only trigger array manipulation when visually necessary. Hope that makes sense!

yassilah avatar Nov 16 '23 09:11 yassilah