Skip to content
Open
Changes from all commits
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
12 changes: 10 additions & 2 deletions src/chart/candlestick/CandlestickView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ class CandlestickView extends ChartView {
private _progressiveEls: Element[];

render(seriesModel: CandlestickSeriesModel, ecModel: GlobalModel, api: ExtensionAPI) {
// If there is clipPath created in large mode. Remove it.
this.group.removeClipPath();
// Clear previously rendered progressive elements.
this._progressiveEls = null;

Expand Down Expand Up @@ -164,6 +162,16 @@ class CandlestickView extends ChartView {
.execute();

this._data = data;

if (needsClip) {
const clipPath = createClipPath(coord, false, seriesModel);
if (clipPath) {
group.setClipPath(clipPath);
}
}
else {
group.removeClipPath();
}
}

_renderLarge(seriesModel: CandlestickSeriesModel) {
Expand Down