@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
57 lines (56 loc) • 2.21 kB
TypeScript
import type { QueryProps } from 'src/shared/types';
import type { ChartToolTipProps, DistributionChartTooltip, DistributionQueryProps, StatisticsQueryProps, TableColumn, TooltipField } from '../types';
interface LineChartProps<TData extends {
id: string | number;
}> {
data: any;
title?: string;
colors?: string[];
url?: string;
xAxisLabel?: string;
yAxisLabel?: string;
chartDetails?: {
columns?: any[];
data?: any[];
};
query: QueryProps;
seriesDataNameKey: string;
seriesDataValueKey: string;
xAxisDataValueKey: string;
chartToolTip: ChartToolTipProps;
tooltipValueFormat: string;
tooltipTitle?: string;
tooltipUnit?: string;
tooltipAdditionalFields?: (string | TooltipField)[];
currencyDisplaySymbol?: string;
smooth?: boolean;
metricDetailData: {
statisticsUrl?: string;
title: 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;
chartToolTip?: ChartToolTipProps;
topFiveChartTitle?: string;
bottomFiveChartTitle?: string;
distributionChartTooltip: DistributionChartTooltip;
};
showDetailsModal?: boolean;
yAxisLabelFormatter?: (value: number) => string;
xAxisLabelFormatter?: (label: string) => string;
}
declare const LineChart: <TData extends {
id: string | number;
}>({ query, data, title, xAxisLabel, yAxisLabel, url, tooltipValueFormat, xAxisDataValueKey, seriesDataNameKey, seriesDataValueKey, tooltipTitle, tooltipUnit, tooltipAdditionalFields, smooth, metricDetailData, showDetailsModal, yAxisLabelFormatter, xAxisLabelFormatter, ...props }: LineChartProps<TData>) => import("react/jsx-runtime").JSX.Element;
export default LineChart;