Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(marker): markArea of bar series now covers whole specified categories #17098

Merged
merged 7 commits into from Sep 23, 2022

Conversation

jiawulin001
Copy link
Member

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

MarkArea in bar series/category axis now covers the categories specified rather than area between bars of specified categories.

Fixed issues

Details

Before: What was the problem?

MarkArea in barSeries/category-axis is marking the area between bars of category specified, which is not wanted in category axis chart.

#3573 image
#12341 image
-- --
#17021 image

After: How is it fixed in this PR?

Now markArea marks the whole category zones specified. Multi-bars and invert input are both considered.

Left MarkArea

markArea: {
          data: [
            [
              {
                name: `Invert input`,
                xAxis: 'Thu'
              },
              {
                xAxis: 'Mon'
              }
            ]
          ]
        }

Left MarkArea

markArea: {
          data: [
            [
              {
                name: 'Single Emphasis',
                xAxis: 'Sun'
              },
              {
                xAxis: 'Sun'
              }
            ]
          ]
        }

after #17021

Misc

  • 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

bar-markArea.html

Others

Merging options

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

Other information

@echarts-bot
Copy link

echarts-bot bot commented May 24, 2022

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.

@dynamikus
Copy link

Any plans to merge this pr?

@pissang pissang added this to the 5.4 milestone May 28, 2022
@Ovilia
Copy link
Contributor

Ovilia commented May 29, 2022

@dynamikus Thanks for your contribution and please be patient to wait for reviews since we are mostly working part-time on the project. :)

@Ovilia
Copy link
Contributor

Ovilia commented May 29, 2022

This PR looks awesome! I would like to see more test cases, for example, when xAxis and yAxis are both configured in the data, or x and y values.

@dynamikus
Copy link

@jiawulin001
Thank you for looking into this. Sorry if my questions sounded condescending or demanding that was never my attention.
Keep up with the great work 👍

@jiawulin001
Copy link
Member Author

jiawulin001 commented Jun 7, 2022

I would like to see more test cases

@Ovilia More test cases are on the way.

Sorry if my questions sounded condescending or demanding that was never my attention.

@dynamikus Thank you for your applause, and it's totally fine to ask. I am really glad if my work can help someone else.

@jiawulin001
Copy link
Member Author

@Ovilia A new test case in the same html is added

@Ovilia
Copy link
Contributor

Ovilia commented Jun 8, 2022

@jiawulin001 Thanks! Please also run the visual test for all cases and see if there are diffs that we should be aware of. You should compare local changes with the nightly build of master branch.

@jiawulin001
Copy link
Member Author

jiawulin001 commented Jun 13, 2022

@Ovilia Thank you for guiding me to visual test. However since "Run all test" takes forever to run, I run the test relative to markArea and markLine and the result is as followed. The first test case is added by me, so it's expected to see differences there and no other test cases are affected.
image

Update 2022/6/13 11:28

Seems that there are issues of MarkPoint caused by changes, dealing with it.
image

Update 2022/6/13 11:39

Issue resolved, now most visual test passed. Let me know if I need to do other testcases.
image

Also it's very time consuming to run all visual tests. It takes 40+ minutes to execute all of them. Is there a way to solve or improve this?

@jiawulin001 jiawulin001 dismissed a stale review via b47d056 June 13, 2022 03:50
@Ovilia
Copy link
Contributor

Ovilia commented Jun 13, 2022

@jiawulin001 Thanks for running the visual tests! I think you are working with the unexpected test results, right?

Also it's very time consuming to run all visual tests. It takes 40+ minutes to execute all of them. Is there a way to solve or improve this?

Usually, we only do a thorough test before releasing a new version or the PR changes a lot of logic or the reviewers are not very confident with the changes. For PRs like this, test the files that contain "mark" in their names should be enough. But a thorough test is always helpful so thanks for the effort and time! :)

@jiawulin001
Copy link
Member Author

I think you are working with the unexpected test results, right?

If you mean the issues of markPoint, it's been resolved in the update. No other issues occur.

@plainheart
Copy link
Member

Hi @jiawulin001, Thanks for your recent contributions! They help a lot! It would be better if you could check the reason why the configured husky hook and ESLint plugin don't work for you. It can give you on-time corresponding warnings and fixing strategies and reduce extra commits that fix lint issues after you make them work normally. :)

@jiawulin001
Copy link
Member Author

My apologies for those lint fix commits! I've been using github desktop to submit commits and the hooks seem not to work on it. I'll use my IDE to submit commits and make sure I execute lint scripts before them in the future. Thank you for your reminding!

@jiawulin001
Copy link
Member Author

I have another question regarding visual test. When I am doing all kinds of PR, is there a criterion how I pick what visual tests to do and how should I present the results to the community?

@Ovilia
Copy link
Contributor

Ovilia commented Jun 14, 2022

I have another question regarding visual test. When I am doing all kinds of PR, is there a criterion how I pick what visual tests to do and how should I present the results to the community?

If you want to export the report, there's a "ALL RUNS" button on the menu. Check the versions and time to know which running should be exported and click "report" to export.

@SevenOutman
Copy link

Any update on this PR? Would help a lot as neither markArea or splitArea is working correctly today in bar charts with dataZoom :(

@jiawulin001
Copy link
Member Author

@Ovilia Hi, I think I've resolved the conflict in merging. Any other suggestions on how should I improve this PR? Or should we move forward to merging?

@Ovilia Ovilia requested review from 100pah and pissang August 9, 2022 04:04
@Ovilia Ovilia modified the milestones: 5.4, 5.4.1 Sep 1, 2022
@ysldnadotme
Copy link

Hi, Is there any plan to merge the problem to the latest version in the near future? @Ovilia 🤔️

@Ovilia
Copy link
Contributor

Ovilia commented Sep 23, 2022

Hi, Is there any plan to merge the problem to the latest version in the near future? @Ovilia 🤔️

This PR is scheduled in 5.4.1, which should be published in November.

Copy link
Contributor

@Ovilia Ovilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've run with all test cases and it looks fine.

@echarts-bot
Copy link

echarts-bot bot commented Sep 23, 2022

To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: PR: doc ready, PR: awaiting doc, PR: doc unchanged

This message is shown because the PR description doesn't contain the document related template.

@Ovilia Ovilia merged commit 583711e into apache:master Sep 23, 2022
@echarts-bot
Copy link

echarts-bot bot commented Sep 23, 2022

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@plainheart plainheart changed the title fix: markArea of bar series now covers whole categories specified fix(marker): markArea of bar series now covers whole specified categories Nov 30, 2022
@andrius-kurtinaitis
Copy link

It seems this PR breaks zoom functionality: #18099

@ily-salamat
Copy link

Since version 5.4.1 the markArea in my bar chart is broken, I think it's related to this PR

@plainheart
Copy link
Member

@ily-salamat Hi, thanks for your report! Please create a new issue and make a reference to this PR. We'll try to confirm and fix it in v5.5.0.

@plainheart
Copy link
Member

Also, thank you @andrius-kurtinaitis for filing a similar bug. I've marked your issue as high-priority and will fix it first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants