Skip to content

fix(candlestick): fix overflow data access in tooltip.#15383

Merged
pissang merged 1 commit into
masterfrom
fix-candlestick-tooltip
Jul 20, 2021
Merged

fix(candlestick): fix overflow data access in tooltip.#15383
pissang merged 1 commit into
masterfrom
fix-candlestick-tooltip

Conversation

@pissang
Copy link
Copy Markdown
Contributor

@pissang pissang commented Jul 20, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Since the change in #15194. Candlestick tooltip will update when dataZoom is triggered. But because data may be empty after dataZoom and getDataParams will have undefined value in this case, and user defined formatted may throw an error if they don't check if the value is undefined. So we need to add an extra check if dataIndex is overflow.

Also, this PR adds a test case for ecomfe/zrender#788

@echarts-bot
Copy link
Copy Markdown

echarts-bot Bot commented Jul 20, 2021

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.

@pissang pissang merged commit 72c62ce into master Jul 20, 2021
@echarts-bot
Copy link
Copy Markdown

echarts-bot Bot commented Jul 20, 2021

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

@pissang pissang deleted the fix-candlestick-tooltip branch July 20, 2021 07:54
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