Skip to content

Commit

Permalink
fix: 当adjust={{type: stack}} 堆叠柱状图最大值显示不对
Browse files Browse the repository at this point in the history
  • Loading branch information
xuying.xu committed Aug 2, 2022
1 parent 11e703c commit c2ab9b9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/f2/src/components/geometry/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isFunction, each, upperFirst, mix, groupToMap, isObject, flatten } from
import Selection, { SelectionState } from './selection';
import { Adjust, getAdjust } from '@antv/adjust';
import { toTimeStamp } from '../../util/index';
import { GeomType, GeometryProps } from './interface';
import { GeomType, GeometryProps, GeometryAdjust } from './interface';
import AttrController from '../../controller/attr';
import equal from '../../base/equal';
import { AnimationCycle } from '../../canvas/animation/interface';
Expand Down Expand Up @@ -143,12 +143,16 @@ class Geometry<
chart.scale.adjustStartZero(y.scale);
}
// 饼图的scale调整,关闭nice
if (isPolar && transposed && adjust === 'stack') {
if (
isPolar &&
transposed &&
(adjust === 'stack' || (adjust as GeometryAdjust)?.type === 'stack')
) {
const { y } = attrs;
chart.scale.adjustPieScale(y.scale);
}

if (adjust === 'stack') {
if (adjust === 'stack' || (adjust as GeometryAdjust)?.type === 'stack') {
this._updateStackRange(yField, y.scale, this.dataArray);
}
}
Expand Down

0 comments on commit c2ab9b9

Please sign in to comment.