File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ const InnerBar = <RawDatum extends BarDatum>({
133
133
toggleSerie,
134
134
legendsWithData,
135
135
barTotals,
136
+ getColor,
136
137
} = useBar < RawDatum > ( {
137
138
indexBy,
138
139
label,
@@ -409,6 +410,7 @@ const InnerBar = <RawDatum extends BarDatum>({
409
410
onClick,
410
411
onMouseEnter,
411
412
onMouseLeave,
413
+ getColor,
412
414
} ) ,
413
415
[
414
416
commonProps ,
@@ -427,6 +429,7 @@ const InnerBar = <RawDatum extends BarDatum>({
427
429
onClick ,
428
430
onMouseEnter ,
429
431
onMouseLeave ,
432
+ getColor ,
430
433
]
431
434
)
432
435
Original file line number Diff line number Diff line change @@ -218,6 +218,7 @@ const InnerBarCanvas = <RawDatum extends BarDatum>({
218
218
shouldRenderBarLabel,
219
219
legendsWithData,
220
220
barTotals,
221
+ getColor,
221
222
} = useBar < RawDatum > ( {
222
223
indexBy,
223
224
label,
@@ -292,6 +293,7 @@ const InnerBarCanvas = <RawDatum extends BarDatum>({
292
293
onClick,
293
294
onMouseEnter,
294
295
onMouseLeave,
296
+ getColor,
295
297
} ) ,
296
298
[
297
299
borderRadius ,
@@ -314,6 +316,7 @@ const InnerBarCanvas = <RawDatum extends BarDatum>({
314
316
onClick ,
315
317
onMouseEnter ,
316
318
onMouseLeave ,
319
+ getColor ,
317
320
]
318
321
)
319
322
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
12
12
Theme ,
13
13
ValueFormat ,
14
14
} from '@nivo/core'
15
- import { InheritedColorConfig , OrdinalColorScaleConfig } from '@nivo/colors'
15
+ import { InheritedColorConfig , OrdinalColorScale , OrdinalColorScaleConfig } from '@nivo/colors'
16
16
import { LegendProps } from '@nivo/legends'
17
17
import { AnyScale , ScaleSpec , ScaleBandSpec } from '@nivo/scales'
18
18
import { SpringValues } from '@react-spring/web'
@@ -124,6 +124,7 @@ interface BarCustomLayerBaseProps<RawDatum>
124
124
125
125
xScale : AnyScale
126
126
yScale : AnyScale
127
+ getColor : OrdinalColorScale < ComputedDatum < RawDatum > >
127
128
}
128
129
129
130
export interface BarCustomLayerProps < RawDatum >
You can’t perform that action at this time.
0 commit comments