Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/chart/candlestick/CandlestickSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export interface CandlestickStateOption {
}
export interface CandlestickDataItemOption
extends CandlestickStateOption, StatesOptionMixin<CandlestickStateOption, ExtraStateOption> {
cursor?: string
value: CandlestickDataValue
}

Expand Down
6 changes: 6 additions & 0 deletions src/chart/candlestick/CandlestickView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ function setBoxCommon(el: NormalBoxPath, data: SeriesData, dataIndex: number, is
el.useStyle(data.getItemVisual(dataIndex, 'style'));
el.style.strokeNoScale = true;

const cursorStyle = itemModel.getShallow('cursor');
cursorStyle && el.attr('cursor', cursorStyle);

el.__simpleBox = isSimpleBox;

setStatesStylesFromModel(el, itemModel);
Expand Down Expand Up @@ -429,6 +432,9 @@ function setLargeStyle(sign: number, el: LargeBoxPath, seriesModel: CandlestickS
el.useStyle(itemStyle);
el.style.fill = null;
el.style.stroke = borderColor;

const cursorStyle = seriesModel.get('cursor');
cursorStyle && el.attr('cursor', cursorStyle);
}


Expand Down
272 changes: 272 additions & 0 deletions test/candlestick-cursor.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.