Skip to content

Commit

Permalink
move gridVisibility out of the barchart and into the shared types
Browse files Browse the repository at this point in the history
  • Loading branch information
annacmc committed Dec 20, 2024
1 parent 72f85a0 commit e9487a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import { BaseTooltip } from '../tooltip';
import styles from './bar-chart.module.scss';
import type { BaseChartProps, SeriesData } from '../shared/types';

interface BarChartProps extends BaseChartProps< SeriesData[] > {
gridVisibility?: 'x' | 'y' | 'xy' | 'none';
}
interface BarChartProps extends BaseChartProps< SeriesData[] > {}

type BarChartTooltipData = { value: number; xLabel: string; yLabel: string; seriesIndex: number };

Expand Down
4 changes: 4 additions & 0 deletions projects/js-packages/charts/src/components/shared/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ export type BaseChartProps< T = DataPoint | DataPointDate > = {
* Legend orientation
*/
legendOrientation?: 'horizontal' | 'vertical';
/**
* Grid visibility
*/
gridVisibility?: 'x' | 'y' | 'xy' | 'none';
};

export type GridVisibilityOptions = 'x' | 'y' | 'xy' | 'none';
Expand Down

0 comments on commit e9487a4

Please sign in to comment.