Skip to content

Commit

Permalink
fix(datazoom): prevent bar and scatter chart overflowing the graph . c…
Browse files Browse the repository at this point in the history
…lose apache#19972
  • Loading branch information
Akash Sonune committed Jan 24, 2025
1 parent 18f0316 commit 97b3f63
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/component/dataZoom/AxisProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,22 @@ class AxisProxy {
const valueWindow = this._valueWindow;

if (filterMode === 'none') {
return;
each(seriesModels, function (seriesModel) {
if (seriesModel.subType === 'bar' || seriesModel.subType === 'scatter') {
// For series type bar and scatter, get the range bound data so that the
// bar and scatter bubbles should not exceed beyond the axis.
// Instead of clipping the bars in such scenario,
// it should show the whole bars within the range.
const seriesData = seriesModel.getData();
const dataDims = seriesData.mapDimensionsAll(axisDim);
each(dataDims, function (dim) {
const range: Dictionary<[number, number]> = {};
range[dim] = valueWindow;
seriesData.selectRange(range);
});
}
});
return;
}

// FIXME
Expand Down

0 comments on commit 97b3f63

Please sign in to comment.