Skip to content
Open
Show file tree
Hide file tree
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
14 changes: 12 additions & 2 deletions src/chart/bar/BarSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class BarSeriesModel extends BaseBarSeriesModel<BarSeriesOption> {
*/
getProgressive() {
// Do not support progressive in normal mode.
return this.get('large')
return this.get('large') && this._isLargeSupported()
? this.get('progressive')
: false;
}
Expand All @@ -130,13 +130,23 @@ class BarSeriesModel extends BaseBarSeriesModel<BarSeriesOption> {
pipeline: Pick<Pipeline, 'progressiveEnabled' | 'threshold'>
) {
const context = preparePipelineContext(this, view, pipeline);
if (!this._isLargeSupported()) {
// Large mode is only laid out on cartesian2d. On polar, `large: true`
// used to reach LargePath with no points and throw, so draw normally.
context.large = false;
context.progressiveRender = false;
}
// Do not support progressive in normal mode.
if (context.progressiveRender) {
else if (context.progressiveRender) {
context.large = true;
}
return context;
}

private _isLargeSupported(): boolean {
return this.get('coordinateSystem') === 'cartesian2d';
}

brushSelector(dataIndex: number, data: SeriesData, selectors: BrushCommonSelectorsForSeries): boolean {
return selectors.rect(data.getItemLayout(dataIndex));
}
Expand Down
46 changes: 46 additions & 0 deletions test/ut/spec/series/bar.test.ts

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