You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/03/30 06:32:29 UTC
[GitHub] [echarts] jiawulin001 opened a new pull request #16772: fix: Dump areaStyle polygon when notMerge is true
jiawulin001 opened a new pull request #16772:
URL: https://github.com/apache/echarts/pull/16772
## Brief Information
This pull request is in the type of:
- [x] bug fixing
- [ ] new feature
- [ ] others
### What does this PR do?
Fix the problem where area shading is not removed after setting chart to be step chart without areaStyle.
### Fixed issues
- #16769
## Details
### Before: What was the problem?
When a line chart with area shade on, changes its option in notMerge mode into a step line chart and turned off the area shade, the previous area shade would not disappear. The causing code is discussed here: https://github.com/apache/echarts/issues/16769#issuecomment-1082591304.
|Before change Option|After change Option|
|---|---|
|<img width="518" alt="before setOption" src="https://user-images.githubusercontent.com/14244944/160765396-0178d574-ff5c-4347-8ef8-fe10b91eba0c.png">|<img width="512" alt="after setOption-bug" src="https://user-images.githubusercontent.com/14244944/160765453-355ede23-7e56-4085-a1c2-6b651a7429e4.png">
### After: How is it fixed in this PR?
Add an `else` to dump the `polygon` if `isAreaChart` is false.
|Before change Option|After change Option|
|---|---|
|<img width="518" alt="before setOption" src="https://user-images.githubusercontent.com/14244944/160765396-0178d574-ff5c-4347-8ef8-fe10b91eba0c.png">|<img width="459" alt="after setOption-fix" src="https://user-images.githubusercontent.com/14244944/160765877-e50d4d0e-a07a-45ab-9783-ffe4539b94ed.png">
## Misc
<!-- ADD RELATED ISSUE ID WHEN APPLICABLE -->
- [ ] The API has been changed (apache/echarts-doc#xxx).
- [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
### Related test cases or examples to use the new APIs
**A test case is added in test/setOption.html**
--
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] plainheart commented on a change in pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#discussion_r838491187
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
> do I need to submit another PR to update the code in the first PR?
No need to do that. I fixed it in the release of v5.3.2.
> what lint tool are you using?
No tools. Just scan with my eyes. Here **"_scan_"** means I looked through it quickly and didn't check the logic.
--
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] jiawulin001 commented on a change in pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on a change in pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#discussion_r839092715
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
> It seems to be not working for you.
I am not sure... Maybe it's better to add it to github workflow? Anyway, I will be careful about the code style, thanks for your suggestion.
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
> It seems to be not working for you.
I am not sure... Maybe it's better to add it to github workflow? Anyway, I will be careful about the code style, thanks for your suggestion.
--
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] plainheart commented on a change in pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#discussion_r838452799
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
Hi, @jiawulin001 Thanks for your recent continuous contribution! 👍
I just scanned your three PRs(#16719, #16750, and this) and found some code style flaws that may bring lint errors. There is a [coding standard](https://echarts.apache.org/zh/coding-standard.html) for reference on the website. It should be useful for you.
--
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] plainheart commented on a change in pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#discussion_r838491187
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
> do I need to submit another PR to update the code in the first PR?
No need to do that. I fixed it in the release of v5.3.2.
> what lint tool are you using?
No tools. Just scan with my eyes. Here **"_scan_"** means I looked through it quickly and didn't check the logic.
And I remember we enable a [git hook](https://github.com/apache/echarts/blob/master/.huskyrc#L3) via **husky** to run lint check before committing. It seems to be not working for you.
--
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] echarts-bot[bot] commented on pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#issuecomment-1082678433
Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
--
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] plainheart commented on a change in pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#discussion_r838452799
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
Hi, @jiawulin001 Thanks for your recent continuous contribution! 👍
I just scanned your three PRs(#16719, #16750, and this) and found some code style flaws that may bring lint errors. There is a [coding standard](https://echarts.apache.org/coding-standard.html) for reference on the website. It should be useful for you.
--
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] jiawulin001 commented on a change in pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on a change in pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#discussion_r838483895
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
Hi, @plainheart thank you for scanning code for me. I've updated the code of two open PRs and do I need to submit another PR to update the code in the first PR? Just out of curiosity, what lint tool are you using? I am using sonarlint and it doesn't seem to bother reminding me of any of 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
[GitHub] [echarts] plainheart commented on a change in pull request #16772: fix: Dump areaStyle polygon when notMerge is true
Posted by GitBox <gi...@apache.org>.
plainheart commented on a change in pull request #16772:
URL: https://github.com/apache/echarts/pull/16772#discussion_r838491187
##########
File path: src/chart/line/LineView.ts
##########
@@ -730,6 +730,10 @@ class LineView extends ChartView {
polygon = this._newPolygon(
points, stackedOnPoints
);
+ }// If areaStyle is removed
+ else if(polygon){
Review comment:
> do I need to submit another PR to update the code in the first PR?
No need to do that. I fixed it in the release of v5.3.2.
> what lint tool are you using?
No tools. Just scan with my eyes. Here **"_scan_"** means I looked through it quickly and didn't check the logic.
And I remember we enable a git hook via **husky** to run lint check before committing. It seems to be not working for you.
--
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