buster/packages/ui-components/src/components/charts/BusterChartJS/hooks/useChartSpecificOptions/interfaces.ts

23 lines
1.1 KiB
TypeScript
Raw Normal View History

2025-07-23 12:42:16 +08:00
import type { ChartType as ChartJSChartType } from 'chart.js';
2025-07-23 23:56:01 +08:00
import type { BusterChartProps } from '../../../BusterChart.types';
2025-07-23 12:42:16 +08:00
import type { ChartEncodes, ChartType } from '@buster/server-shared/metrics';
import type { ChartProps } from '../../core';
export interface UseChartSpecificOptionsProps {
selectedChartType: ChartType;
pieShowInnerLabel: BusterChartProps['pieShowInnerLabel'];
pieInnerLabelTitle: BusterChartProps['pieInnerLabelTitle'];
pieInnerLabelAggregate: BusterChartProps['pieInnerLabelAggregate'];
pieDonutWidth: BusterChartProps['pieDonutWidth'];
pieLabelPosition: BusterChartProps['pieLabelPosition'];
pieDisplayLabelAs: BusterChartProps['pieDisplayLabelAs'];
columnLabelFormats: NonNullable<BusterChartProps['columnLabelFormats']>;
selectedAxis: ChartEncodes;
barShowTotalAtTop: BusterChartProps['barShowTotalAtTop'];
columnSettings: BusterChartProps['columnSettings'];
barGroupType: BusterChartProps['barGroupType'];
data: ChartProps<ChartJSChartType>['data'];
}
export type ChartSpecificOptionsProps = Omit<UseChartSpecificOptionsProps, 'selectedChartType'>;