Skip to content

Commit d15406e

Browse files
authoredMay 10, 2022
fix(bar): allow BarCanvas axis to be nullable (#1980)
Types do not currently allow `axisBottom`, `axisLeft`, `axisRight`, or `axisTop` to be set to `null`, however this is required to disable axis and is found in the nivo documentation.
1 parent b021074 commit d15406e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎packages/bar/src/types.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@ export type BarCanvasProps<RawDatum extends BarDatum> = Partial<BarCommonProps<R
289289
BarHandlers<RawDatum, HTMLCanvasElement> &
290290
Dimensions &
291291
Partial<{
292-
axisBottom: CanvasAxisProps<any>
293-
axisLeft: CanvasAxisProps<any>
294-
axisRight: CanvasAxisProps<any>
295-
axisTop: CanvasAxisProps<any>
292+
axisBottom: CanvasAxisProps<any> | null
293+
axisLeft: CanvasAxisProps<any> | null
294+
axisRight: CanvasAxisProps<any> | null
295+
axisTop: CanvasAxisProps<any> | null
296296

297297
renderBar: (context: CanvasRenderingContext2D, props: RenderBarProps<RawDatum>) => void
298298

0 commit comments

Comments
 (0)
Please sign in to comment.