From 30aa15944fc7f18f96af4c653965da2b1498f2c6 Mon Sep 17 00:00:00 2001 From: Kit Randel Date: Wed, 27 Apr 2022 16:02:20 -0700 Subject: [PATCH] Allow BarCanvas axis to be nullable 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. --- packages/bar/src/types.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bar/src/types.ts b/packages/bar/src/types.ts index 78d6d3c2b..5e7b720f4 100644 --- a/packages/bar/src/types.ts +++ b/packages/bar/src/types.ts @@ -289,10 +289,10 @@ export type BarCanvasProps = Partial & Dimensions & Partial<{ - axisBottom: CanvasAxisProps - axisLeft: CanvasAxisProps - axisRight: CanvasAxisProps - axisTop: CanvasAxisProps + axisBottom: CanvasAxisProps | null + axisLeft: CanvasAxisProps | null + axisRight: CanvasAxisProps | null + axisTop: CanvasAxisProps | null renderBar: (context: CanvasRenderingContext2D, props: RenderBarProps) => void