@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
51 lines (50 loc) • 1.99 kB
TypeScript
import type { QueryProps } from 'src/shared/types';
import type { ChartToolTipProps, DistributionChartTooltip, DistributionQueryProps, StatisticsQueryProps, TableColumn, TooltipField } from '../types';
interface LineGraphProps<TData extends {
id: string | number;
}> {
title: string;
yAxisLabel: string;
xAxisLabel?: string;
color?: string;
className?: string;
xAxisDataKey: string;
yAxisDataKey: string;
categoryDataKey: string;
url?: string;
query: QueryProps;
chartToolTip: ChartToolTipProps;
tooltipValueFormat: string;
tooltipTitle?: string;
tooltipUnit?: string;
seriesName?: string;
tooltipAdditionalFields?: (string | TooltipField)[];
yAxisLabelFormatter?: (value: number) => string;
metricDetailData: {
title: string;
statisticsUrl?: string;
itemStatisticsQuery: StatisticsQueryProps;
valueMetricsQuery: StatisticsQueryProps;
averageMetricsQuery: StatisticsQueryProps;
distributionMetricsQuery: DistributionQueryProps;
yAxisDataNameKey: string;
xAxisNameKey: string;
xAxisLabel: string;
yAxisLabel: string;
nameKey: string;
valueKey: string;
dataGridSearchKey: string;
dataGridColumns: TableColumn<TData>[];
dataSearchInputPlaceHolder: string;
detailsTableTitle?: string;
topFiveChartTitle: string;
bottomFiveChartTitle: string;
distributionChartTooltip: DistributionChartTooltip;
};
}
declare const LineGraph: <TData extends {
id: string | number;
}>({ title, yAxisLabel, xAxisLabel, color, className, xAxisDataKey, yAxisDataKey, categoryDataKey, url, query, chartToolTip, tooltipValueFormat, tooltipTitle, tooltipUnit, tooltipAdditionalFields, yAxisLabelFormatter, metricDetailData, showDetailsModal, ...props }: LineGraphProps<TData> & {
showDetailsModal?: boolean;
}) => import("react/jsx-runtime").JSX.Element;
export default LineGraph;