UNPKG

2.23 kBTypeScriptView Raw
1import { IVector2D } from './coordinates.model';
2export type StringOrNumberOrDate = string | number | Date;
3export interface DataItem {
4 name: StringOrNumberOrDate;
5 value: number;
6 extra?: any;
7 min?: number;
8 max?: number;
9 label?: string;
10}
11export interface SingleSeries extends Array<DataItem> {
12}
13export interface Series {
14 name: StringOrNumberOrDate;
15 series: DataItem[];
16}
17export interface MultiSeries extends Array<Series> {
18}
19export interface AreaChartDataItem extends DataItem {
20 d0: number;
21 d1: number;
22}
23export interface AreaChartSeries {
24 name: StringOrNumberOrDate;
25 series: AreaChartDataItem[];
26}
27export interface PieGridData {
28 data: PieGridDataItem;
29 height: number;
30 width: number;
31 x: number;
32 y: number;
33}
34export interface PieGridDataItem extends DataItem {
35 percent: number;
36 total: number;
37 value: number;
38}
39export interface BubbleChartDataItem {
40 name: StringOrNumberOrDate;
41 x: StringOrNumberOrDate;
42 y: StringOrNumberOrDate;
43 r: number;
44 extra?: any;
45}
46export interface BubbleChartSeries {
47 name: StringOrNumberOrDate;
48 series: BubbleChartDataItem[];
49}
50export interface BubbleChartMultiSeries extends Array<BubbleChartSeries> {
51}
52export interface TreeMapDataItem {
53 name: StringOrNumberOrDate;
54 size?: number;
55 children?: TreeMapDataItem[];
56 extra?: any;
57}
58export interface TreeMapData extends Array<TreeMapDataItem> {
59}
60export interface SankeyObject {
61 source: string;
62 target: string;
63 value: number;
64}
65export interface SankeyData extends Array<SankeyObject> {
66}
67export interface BoxChartSeries {
68 name: StringOrNumberOrDate;
69 series: DataItem[];
70}
71export interface BoxChartMultiSeries extends Array<BoxChartSeries> {
72}
73export interface IBoxModel {
74 value: number | Date;
75 label: StringOrNumberOrDate;
76 data: DataItem[];
77 formattedLabel: string;
78 height: number;
79 width: number;
80 x: number;
81 y: number;
82 roundEdges: boolean;
83 lineCoordinates: IVector2D[];
84 quartiles: number[];
85 tooltipText?: string;
86 ariaLabel?: string;
87 color?: string;
88 gradientStops?: Array<{
89 offset: number;
90 color: string;
91 opacity: number;
92 }>;
93}