UNPKG

@tapsellorg/angular-material-library

Version:

Angular library for Tapsell

58 lines (57 loc) 2.12 kB
import { TooltipFormatterContextObject } from 'highcharts'; import { PghChartStatBoxDirective } from './chart-stat-box.directive'; export type PghChartTooltipFormatter = (data: TooltipFormatterContextObject) => { data?: ReturnType<PghChartYAxisTooltipFormatter>[]; name?: string | null | undefined; }; export type PghChartYAxisTooltipFormat = 'number' | 'percent' | 'currency' | 'percent-pie'; export type PghChartXAxisTooltipFormat = 'date-time' | 'date' | 'time'; export type PghFullChartTooltipFormat = PghChartYAxisTooltipFormat | `${PghChartYAxisTooltipFormat}:${PghChartXAxisTooltipFormat}`; export interface PghChartActiveStatBoxesChangeEvent<D = any> { statBoxes: PghChartStatBox<D>[]; indexes: number[]; } export type PghChartYAxisTooltipFormatter = (data: TooltipFormatterContextObject) => string | number | null | undefined; export declare class PghChartStatBox<D = any> { markerDirective: PghChartStatBoxDirective; index: number; color: string; isActive: boolean; get inputData(): D; constructor(markerDirective: PghChartStatBoxDirective, index: number, color: string); } export type PghChartYAxisTooltip = PghChartYAxisTooltipFormat | string | PghChartYAxisTooltipFormatter; export interface PghSimpleHighchartsSeries<D = PghSimpleChartData> { name: string; data: D; type?: 'areaspline' | 'column' | 'pie' | 'map'; yAxis?: number; tooltip?: PghChartYAxisTooltip; } export interface PghFullChartYAxis { labels?: { format?: string; }; opposite?: boolean; } export type PghSimpleChartData = number[]; export type PghPieChartData = { name: string; y: number; }[]; export interface PghGlobalChartOptions { disableChartBoxScroll?: boolean; maxActiveChartBoxes?: PghMaxActiveChartBox; fullChartTooltip?: { xAxis?: PghChartXAxisTooltipFormat; yAxis?: PghChartYAxisTooltipFormat; }; } export type PghMaxActiveChartBox = number | 'infinite'; export interface PghMapChartDataItem { id?: string; name: string; value: number | null; tooltipValue: string | number; changed: boolean; }