Skip to content

Commit

Permalink
add barchart storybook item
Browse files Browse the repository at this point in the history
  • Loading branch information
annacmc committed Dec 19, 2024
1 parent 0414723 commit 4ec9cb3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const BarChart: FC< BarChartProps > = ( {
legendOrientation = 'horizontal',
className,
showGridX = true,
showGridY = true,
showGridY = false,
} ) => {
const theme = useChartTheme();
const { tooltipOpen, tooltipLeft, tooltipTop, tooltipData, hideTooltip, showTooltip } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const Default: StoryType = {
data: [ data[ 0 ], data[ 1 ], data[ 2 ] ], // limit to 3 series for better readability
showLegend: false,
legendOrientation: 'horizontal',
showGridX: true,
showGridY: false,
},
};

Expand Down Expand Up @@ -81,3 +83,11 @@ export const WithVerticalLegend = {
legendOrientation: 'vertical',
},
};

export const WithXYGrid = {
args: {
...Default.args,
showGridX: true,
showGridY: true,
},
};

0 comments on commit 4ec9cb3

Please sign in to comment.