File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,8 @@ export type AxisOptionsBase = {
228
228
tickLabelRotationDeg ?: number
229
229
innerBandPadding ?: number
230
230
outerBandPadding ?: number
231
+ minBandSize ?: number
232
+ maxBandSize ?: number
231
233
showGrid ?: boolean
232
234
// showTicks?: boolean
233
235
// filterTicks?: <T extends string>(ticks: T[]) => T[]
Original file line number Diff line number Diff line change @@ -135,7 +135,13 @@ export function getPrimaryLength<TDatum>(
135
135
primaryAxis : Axis < TDatum >
136
136
) {
137
137
if ( primaryAxis . axisFamily === 'band' ) {
138
- return Math . max ( primaryAxis . scale . bandwidth ( ) , primaryAxis . minBandSize ?? 1 )
138
+ return Math . min (
139
+ Math . max (
140
+ primaryAxis . scale . bandwidth ( ) ,
141
+ primaryAxis . minBandSize ?? 99999999
142
+ ) ,
143
+ primaryAxis . maxBandSize ?? 1
144
+ )
139
145
}
140
146
141
147
return Math . max ( primaryAxis . bandScale . bandwidth ( ) , 1 )
You can’t perform that action at this time.
0 commit comments