diff --git a/packages/victory-bar/src/helper-methods.ts b/packages/victory-bar/src/helper-methods.ts index cecaee66c..1d3223dda 100644 --- a/packages/victory-bar/src/helper-methods.ts +++ b/packages/victory-bar/src/helper-methods.ts @@ -5,6 +5,7 @@ import { Helpers, LabelHelpers, Scale, + VictoryClipContainer } from "victory-core"; export const getBarPosition = (props, datum) => { @@ -61,7 +62,7 @@ const getCalculatedValues = (props) => { let data = Data.getData(props); data = Data.formatDataFromDomain(data, domain, 0); - if (props.groupComponent.type.displayName === 'VictoryClipContainer') { + if (props.groupComponent.type === VictoryClipContainer) { data = data.map((datum) => { datum._x = datum.x; datum._y = datum.y; diff --git a/packages/victory-bar/src/victory-bar.tsx b/packages/victory-bar/src/victory-bar.tsx index 04f5bff57..688299f33 100644 --- a/packages/victory-bar/src/victory-bar.tsx +++ b/packages/victory-bar/src/victory-bar.tsx @@ -13,6 +13,7 @@ import { EventPropTypeInterface, NumberOrCallback, StringOrNumberOrCallback, + VictoryClipContainer, VictoryCommonProps, VictoryDatableProps, VictoryMultiLabelableProps, @@ -142,7 +143,7 @@ class VictoryBarBase extends React.Component { } let children; - if (props.groupComponent.type.displayName === 'VictoryClipContainer') { + if (props.groupComponent.type === VictoryClipContainer) { children = this.renderData(props, () => true); } else { children = this.renderData(props);