UNPKG

956 BTypeScriptView Raw
1/**
2 * Copyright (c) 2017 ~ present NAVER Corp.
3 * billboard.js project is licensed under the MIT license
4 */
5import { Selection } from "d3-selection"; /* tslint:disable-line */
6
7export type PrimitiveArray = Array<string | boolean | number | Date | null>;
8export type ArrayOrString = string[] | string;
9export type d3Selection = Selection<any, any, any, any>;
10export type ChartTypes = "area"
11 | "area-line-range"
12 | "area-spline"
13 | "area-spline-range"
14 | "area-step"
15 | "bar"
16 | "bubble"
17 | "donut"
18 | "gauge"
19 | "line"
20 | "pie"
21 | "radar"
22 | "scatter"
23 | "spline"
24 | "step";
25
26export interface TargetIds {
27 ids: string[] | string;
28}
29
30export type DataArray = Array<{
31 id: string;
32 id_org: string;
33 values: DataItem[]
34}>;
35
36export interface DataItem {
37 id: string;
38 index: number;
39 value: number;
40 x: number;
41 ratio?: number;
42}
43
44export interface RegionsType {
45 [key: string]: {
46 start?: number;
47 end?: number;
48 style?: {
49 dasharray?: string;
50 }
51 };
52}