echarts icon indicating copy to clipboard operation
echarts copied to clipboard

fix: markArea of bar series now covers whole categories specified

Open jiawulin001 opened this issue 3 years ago • 18 comments

Brief Information

This pull request is in the type of:

  • [x] 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

  • fix #3573
  • fix #17021
  • fix #12341

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

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

Other information

jiawulin001 avatar May 24 '22 07:05 jiawulin001

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.

echarts-bot[bot] avatar May 24 '22 07:05 echarts-bot[bot]

Any plans to merge this pr?

dynamikus avatar May 27 '22 15:05 dynamikus

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

Ovilia avatar May 29 '22 15:05 Ovilia

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.

Ovilia avatar May 29 '22 15:05 Ovilia

@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 👍

dynamikus avatar May 30 '22 22:05 dynamikus

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 avatar Jun 07 '22 01:06 jiawulin001

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

jiawulin001 avatar Jun 07 '22 08:06 jiawulin001

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

Ovilia avatar Jun 08 '22 06:06 Ovilia

@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 avatar Jun 13 '22 01:06 jiawulin001

@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! :)

Ovilia avatar Jun 13 '22 08:06 Ovilia

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.

jiawulin001 avatar Jun 13 '22 09:06 jiawulin001

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

plainheart avatar Jun 14 '22 06:06 plainheart

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 avatar Jun 14 '22 08:06 jiawulin001

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?

jiawulin001 avatar Jun 14 '22 08:06 jiawulin001

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.

Ovilia avatar Jun 14 '22 09:06 Ovilia

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

SevenOutman avatar Jul 20 '22 09:07 SevenOutman

@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?

jiawulin001 avatar Jul 23 '22 03:07 jiawulin001

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

ysldnadotme avatar Sep 19 '22 09:09 ysldnadotme

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.

Ovilia avatar Sep 23 '22 04:09 Ovilia

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.

echarts-bot[bot] avatar Sep 23 '22 05:09 echarts-bot[bot]

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

echarts-bot[bot] avatar Sep 23 '22 05:09 echarts-bot[bot]

It seems this PR breaks zoom functionality: https://github.com/apache/echarts/issues/18099

andrius-kurtinaitis avatar Dec 28 '22 08:12 andrius-kurtinaitis

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

ily-salamat avatar Jan 02 '23 10:01 ily-salamat

@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 avatar Jan 02 '23 10:01 plainheart

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

plainheart avatar Jan 02 '23 10:01 plainheart