Skip to content

Commit ce500cf

Browse files
author
huanxi
authored
feature(treemap): add custom cursor properties for treemap (#20113)
1 parent eeaf52e commit ce500cf

File tree

3 files changed

+199
-1
lines changed

3 files changed

+199
-1
lines changed

src/chart/treemap/TreemapSeries.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ export interface TreemapSeriesNodeItemOption extends TreemapSeriesVisualOption,
144144

145145
color?: ColorString[] | 'none'
146146

147-
decal?: DecalObject[] | 'none'
147+
decal?: DecalObject[] | 'none',
148+
149+
cursor?: string
148150
}
149151

150152
export interface TreemapSeriesOption

src/chart/treemap/TreemapView.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,9 @@ function renderNode(
877877
// Only for enabling highlight/downplay.
878878
data.setItemGraphicEl(thisNode.dataIndex, group);
879879

880+
const cursorStyle = nodeModel.getShallow('cursor');
881+
cursorStyle && content.attr('cursor', cursorStyle);
882+
880883
enableHoverFocus(group, focusOrIndices, blurScope);
881884
}
882885

test/treemap-cursor.html

Lines changed: 193 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)