Skip to content

feat(heatmap): support cell cursor configuration - #21798

Draft
diysimon wants to merge 1 commit into
apache:masterfrom
diysimon:fix-20569
Draft

diysimon wants to merge 1 commit into
apache:masterfrom
diysimon:fix-20569

Conversation

@diysimon

@diysimon diysimon commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Brief Information

  • bug fixing
  • new feature
  • others

What does this PR do?

Honor the existing series cursor setting on heatmap cells, with optional per-item overrides.

Fixed issues

Closes #20569.

Details

Before: What was the problem?

HeatmapView created cell rectangles without applying cursor. With a series cursor of crosshair and a first-item cursor of help, all cells still used pointer. On the unmodified base, 18 cursor configuration tests failed while six default-behavior tests passed.

After: How does it behave after the fixing?

The shared grid-like rendering path reads the series cursor once, resolves per-item values through existing item-model inheritance, and forwards the value to the rectangle, following Symbol and other series.

This covers Cartesian, calendar, and matrix cells in normal and progressive Canvas rendering, and normal SVG rendering. Item overrides do not leak into following tuple or object items. Clearing only the series cursor preserves item overrides; clearing it and replacing data with tuples restores pointer.

SeriesOption already declares series.cursor. Adding data[i].cursor is a backward-compatible public type and runtime extension for heatmap, using existing cursor semantics. Geo heatmaps remain silent raster images; this change does not add per-point interaction. Production code changes are three lines in HeatmapView and one data-item type declaration.

Document Info

  • This PR doesn't relate to document changes
  • The document should be updated later

A companion English and Chinese documentation draft is available at apache/echarts-doc#540. It covers series and item cursor options, inheritance, supported coordinates, progressive rendering, and the geo limitation, with version markers for the current 6.1.0 development version.

Validation

Locally on macOS with Node 22.14.0:

  • Focused Jest tests: 30 passed, covering three coordinate systems in normal and progressive rendering.
  • Full Jest suite: 27 suites, 224 tests passed.
  • build:lib, checktype, and a strict consumer check of generated heatmap declarations passed.
  • Full uncached ESLint check: 604 files, no errors or warnings.
  • ASF header check and git diff --check passed.
  • Headless Chrome: 216 real mouse cursor checks across before/after scenarios. The six-chart manual page and all 18 buttons passed. The additional series-only reset cases were checked in Jest, not added to the browser matrix.

The initial lint run overlapped with declaration generation and reported six BMap diagnostics. Later full uncached checks passed without changing BMap. Incomplete generated types are a suspected cause, not a confirmed diagnosis.

Not run locally: the full visual comparison suite, complete release packaging, the full supported TypeScript-version matrix, or the Node 20 CI environment. CI results are not claimed here.

Misc

Security Checking

  • This PR introduces security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes.

Related test cases

  • test/heatmap-cursor.html
  • test/ut/spec/series/heatmap.test.ts
  • test/types/esm/heatmap.ts

Other information

Implementation, tests, and this description were prepared with OpenAI Codex. Submitted as a draft for maintainer review.

@echarts-bot echarts-bot Bot added the PR: awaiting doc Document changes is required for this PR. label Oct 19, 2026
@echarts-bot

echarts-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

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.

This branch has not been deployed

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

Labels

PR: awaiting doc Document changes is required for this PR. size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Cursor change option for Heatmaps

1 participant