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

feat(state): add emphasis.disabled #16368

Merged
merged 2 commits into from
Jan 14, 2022
Merged

feat(state): add emphasis.disabled #16368

merged 2 commits into from
Jan 14, 2022

Conversation

pissang
Copy link
Contributor

@pissang pissang commented Jan 13, 2022

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Introduce emphasis.disabled to disable emphasis state on hover and tooltip trigger. Previously we can only use silent to disable any hover interactions. But it will also lost the mouse event.

By disabling emphasis state. We can avoid potential performance issue when interacting with massive data like in #16133 . Or remove unwanted highlight / emphasis effect like in #14952

Also ee related select.disabled PR by @susiwen8 .

Fixed issues

#14952

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

Disable emphasis state of whole series

series: [{
  emphasis: {
     disabled: true
  }
}]

Disable emphasis state of single data

series: [{
  data: [{
      name: 'xxx',
      emphasis: { disabled: true }
  }]
}]

Disable emphasis state in custom series

renderItem() {
  return {
      type: 'group',
      emphasisDisabled: true
  }
}

Others

Merging options

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

Other information

@echarts-bot
Copy link

echarts-bot bot commented Jan 13, 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.

The pull request is marked to be PR: author is committer because you are a committer of this project.

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 echarts-bot bot added PR: author is committer PR: awaiting doc Document changes is required for this PR. PR: awaiting review labels Jan 13, 2022
@pissang pissang added this to the 5.3 milestone Jan 13, 2022
Copy link
Member

@plainheart plainheart left a comment

Choose a reason for hiding this comment

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

It seems the first test case in line-visual2.html doesn't work anymore.

Before Current
image image

@pissang
Copy link
Contributor Author

pissang commented Jan 14, 2022

@plainheart Seems it's introduced by gradient color highlight and animation in #16225 and ecomfe/zrender#857 . Will take a look at it

@pissang
Copy link
Contributor Author

pissang commented Jan 14, 2022

@plainheart Turns out it's a very stupid typo. ecomfe/zrender#872 . Also added a interaction record for this case.

Copy link
Member

@plainheart plainheart left a comment

Choose a reason for hiding this comment

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

LGTM

@pissang pissang merged commit a652792 into next Jan 14, 2022
@echarts-bot
Copy link

echarts-bot bot commented Jan 14, 2022

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

@pissang pissang deleted the emphasis-disabled branch January 14, 2022 13:40
@plainheart plainheart removed the PR: awaiting doc Document changes is required for this PR. label Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants