Skip to content

fix(candlestick): support cursor option#21558

Open
diysimon wants to merge 1 commit intoapache:masterfrom
diysimon:fix-21551
Open

fix(candlestick): support cursor option#21558
diysimon wants to merge 1 commit intoapache:masterfrom
diysimon:fix-21551

Conversation

@diysimon
Copy link
Copy Markdown
Contributor

close #21551

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fixes the missing cursor support on candlestick series and adds a manual test page for verification.

Fixed issues

Details

Before: What was the problem?

cursor is a supported option on some series types, but it did not work on candlestick.

The main reason was that candlestick view did not forward the cursor option to zrender elements:

  • in normal mode, the candlestick path did not read itemModel.getShallow('cursor')
  • in large mode, the large candlestick paths did not apply series.cursor

As a result, hovering candlestick elements still showed the default cursor.

After: How does it behave after the fixing?

After this change:

  • series.cursor works on candlestick in normal mode
  • data[i].cursor also works in normal mode
  • series.cursor works on candlestick in large mode

The fix is kept minimal by only wiring the existing cursor option through CandlestickView and adding a manual test page:

  • test/candlestick-cursor.html

The test page includes:

  • a normal-mode candlestick chart similar to the candlestick-sh example
  • a large-mode candlestick chart for verifying the large rendering path

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/candlestick-cursor.html

Merging options

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

Other information

Local verification:

  • eslint
  • tsc --noEmit
  • manual verification in test/candlestick-cursor.html

@echarts-bot
Copy link
Copy Markdown

echarts-bot bot commented Mar 30, 2026

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.

Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.

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.

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.

[Bug] 从5.5版本升级到 6.0, 可拖动区域鼠标自动变成手形, 如何改回默认或十字光标

1 participant