diff --git a/packages/bar/src/Bar.tsx b/packages/bar/src/Bar.tsx index 60fdef6be..0513bd8bc 100644 --- a/packages/bar/src/Bar.tsx +++ b/packages/bar/src/Bar.tsx @@ -133,6 +133,7 @@ const InnerBar = ({ toggleSerie, legendsWithData, barTotals, + getColor, } = useBar({ indexBy, label, @@ -250,8 +251,6 @@ const InnerBar = ({ () => ({ borderRadius, borderWidth, - colorBy, - colors, enableLabel, isInteractive, labelSkipWidth, @@ -271,8 +270,6 @@ const InnerBar = ({ [ borderRadius, borderWidth, - colorBy, - colors, enableLabel, getTooltipLabel, isInteractive, @@ -413,6 +410,7 @@ const InnerBar = ({ onClick, onMouseEnter, onMouseLeave, + getColor, }), [ commonProps, @@ -431,6 +429,7 @@ const InnerBar = ({ onClick, onMouseEnter, onMouseLeave, + getColor, ] ) diff --git a/packages/bar/src/BarCanvas.tsx b/packages/bar/src/BarCanvas.tsx index 27459641e..38e93a664 100644 --- a/packages/bar/src/BarCanvas.tsx +++ b/packages/bar/src/BarCanvas.tsx @@ -218,6 +218,7 @@ const InnerBarCanvas = ({ shouldRenderBarLabel, legendsWithData, barTotals, + getColor, } = useBar({ indexBy, label, @@ -292,6 +293,7 @@ const InnerBarCanvas = ({ onClick, onMouseEnter, onMouseLeave, + getColor, }), [ borderRadius, @@ -314,6 +316,7 @@ const InnerBarCanvas = ({ onClick, onMouseEnter, onMouseLeave, + getColor, ] ) diff --git a/packages/bar/src/types.ts b/packages/bar/src/types.ts index 22a4ab575..2b63651a2 100644 --- a/packages/bar/src/types.ts +++ b/packages/bar/src/types.ts @@ -124,6 +124,7 @@ interface BarCustomLayerBaseProps xScale: AnyScale yScale: AnyScale + getColor: OrdinalColorScaleConfig> } export interface BarCustomLayerProps