diff --git a/src/chart/treemap/TreemapSeries.ts b/src/chart/treemap/TreemapSeries.ts index 571475e714..a38446ed85 100644 --- a/src/chart/treemap/TreemapSeries.ts +++ b/src/chart/treemap/TreemapSeries.ts @@ -144,7 +144,9 @@ export interface TreemapSeriesNodeItemOption extends TreemapSeriesVisualOption, color?: ColorString[] | 'none' - decal?: DecalObject[] | 'none' + decal?: DecalObject[] | 'none', + + cursor?: string } export interface TreemapSeriesOption diff --git a/src/chart/treemap/TreemapView.ts b/src/chart/treemap/TreemapView.ts index bc59c28544..a0b892e1ee 100644 --- a/src/chart/treemap/TreemapView.ts +++ b/src/chart/treemap/TreemapView.ts @@ -877,6 +877,9 @@ function renderNode( // Only for enabling highlight/downplay. data.setItemGraphicEl(thisNode.dataIndex, group); + const cursorStyle = nodeModel.getShallow('cursor'); + cursorStyle && content.attr('cursor', cursorStyle); + enableHoverFocus(group, focusOrIndices, blurScope); } diff --git a/test/treemap-cursor.html b/test/treemap-cursor.html new file mode 100644 index 0000000000..2a415d4ccb --- /dev/null +++ b/test/treemap-cursor.html @@ -0,0 +1,193 @@ + + + + +
+ + + + + + + + + + + + + + +