pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
51 lines (50 loc) • 1.86 kB
TypeScript
import type { QueryProps } from 'src/shared/types';
import type { ChartToolTipProps, DistributionQueryProps, StatisticsQueryProps, TableColumn, TooltipField } from '../types';
interface BarChartProps<TData extends {
id: string | number;
}> {
options?: any;
title?: string;
stacked?: boolean;
chartDetails?: {
columns?: any[];
data?: any[];
};
themeColor?: string;
colors?: string[];
url?: string;
query: QueryProps;
seriesDataNameKey: string;
seriesDataValueKey: string;
xAxisDataValueKey: string;
chartToolTip?: ChartToolTipProps;
tooltipValueFormat: string;
tooltipTitle?: string;
tooltipUnit?: string;
tooltipAdditionalFields?: (string | TooltipField)[];
metricDetailData: {
statisticsUrl?: string;
title: string;
topFiveChartTitle: string;
bottomFiveChartTitle: string;
itemStatisticsQuery: StatisticsQueryProps;
yAxisDataNameKey: string;
xAxisNameKey: string;
xAxisLabel: string;
yAxisLabel: string;
valueMetricsQuery: StatisticsQueryProps;
averageMetricsQuery: StatisticsQueryProps;
distributionMetricsQuery: DistributionQueryProps;
nameKey: string;
valueKey: string;
dataGridSearchKey: string;
dataGridColumns: TableColumn<TData>[];
dataSearchInputPlaceHolder: string;
chartToolTip?: ChartToolTipProps;
detailsTableTitle?: string;
};
}
declare const BarChart: <TData extends {
id: string | number;
}>({ query, options, title, stacked, url, xAxisDataValueKey, seriesDataNameKey, seriesDataValueKey, chartToolTip, tooltipValueFormat, tooltipTitle, tooltipUnit, tooltipAdditionalFields, metricDetailData, ...props }: BarChartProps<TData>) => import("react/jsx-runtime").JSX.Element;
export default BarChart;