Skip to content

fix(line): keep labels above lines. close #15679#21682

Open
rahul37wallst-sudo wants to merge 1 commit into
apache:masterfrom
rahul37wallst-sudo:investigate-15679-line-label-zorder
Open

fix(line): keep labels above lines. close #15679#21682
rahul37wallst-sudo wants to merge 1 commit into
apache:masterfrom
rahul37wallst-sudo:investigate-15679-line-label-zorder

Conversation

@rahul37wallst-sudo

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Keeps line series paths below labels from mixed series by lowering the default line polyline z2.

Fixed issues

Details

Before: What was the problem?

In mixed charts such as bar + line, the line polyline used a default z2 of 10.

That made the line path render above labels attached to other series, so a line series could visually overlap bar labels.

After: How does it behave after the fixing?

The line polyline default z2 is lowered to 1, so it no longer sits above labels from other series.

A regression test was added to verify that a line polyline is rendered below a bar label in a mixed bar + line chart.

Document Info

One of the following should be checked.

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

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

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

Related test cases or examples to use the new APIs

  • test/ut/spec/series/line.test.ts

Validation run:

  • npx jest --config test/ut/jest.config.cjs --coverage=false --runInBand --runTestsByPath test/ut/spec/series/line.test.ts
  • npm run lint
  • npm run checktype
  • npx eslint test/ut/spec/series/line.test.ts
  • git --no-pager diff --check

Merging options

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

Other information

N.A.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant