1- import { InheritedColorConfig , OrdinalColorScaleConfig } from '@nivo/colors'
21import {
32 BarCommonProps ,
4- BarDatum ,
53 ComputedDatum ,
64 BarSvgPropsWithDefaults ,
75 BarCanvasPropsWithDefaults ,
@@ -13,8 +11,8 @@ import { renderBar } from './renderBar'
1311export const commonDefaultProps : Omit < BarCommonProps , 'data' | 'theme' > = {
1412 indexBy : 'id' ,
1513 keys : [ 'value' ] ,
16- groupMode : 'stacked' as const ,
17- layout : 'vertical' as const ,
14+ groupMode : 'stacked' ,
15+ layout : 'vertical' ,
1816 valueScale : { type : 'linear' , nice : true , round : false } ,
1917 indexScale : { type : 'band' , round : false } ,
2018 padding : 0.1 ,
@@ -23,16 +21,16 @@ export const commonDefaultProps: Omit<BarCommonProps, 'data' | 'theme'> = {
2321 enableGridY : true ,
2422 enableLabel : true ,
2523 label : 'formattedValue' ,
26- labelPosition : 'middle' as const ,
24+ labelPosition : 'middle' ,
2725 labelOffset : 0 ,
2826 labelSkipWidth : 0 ,
2927 labelSkipHeight : 0 ,
3028 labelTextColor : { theme : 'labels.text.fill' } ,
31- colorBy : 'id' as const ,
32- colors : { scheme : 'nivo' } as OrdinalColorScaleConfig ,
29+ colorBy : 'id' ,
30+ colors : { scheme : 'nivo' } ,
3331 borderRadius : 0 ,
3432 borderWidth : 0 ,
35- borderColor : { from : 'color' } as InheritedColorConfig < any > ,
33+ borderColor : { from : 'color' } ,
3634 isInteractive : true ,
3735 tooltip : BarTooltip ,
3836 tooltipLabel : ( datum : ComputedDatum ) => `${ datum . id } - ${ datum . indexValue } ` ,
0 commit comments