deno.land / x / billboardjs@3.6.0 / config / Options / data / axis.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/** * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license *//** * Axis based chart data config options */export default { /** * Specify the keys of the x values for each data.<br><br> * This option can be used if we want to show the data that has different x values. * @name data․xs * @memberof Options * @type {object} * @default {} * @example * data: { * xs: { * data1: "x1", * data2: "x2" * } * } */ data_xs: {},
/** * Set a format specifier to parse string specifed as x. * @name data․xFormat * @memberof Options * @type {string} * @default %Y-%m-%d * @example * data: { * x: "x", * columns: [ * ["x", "01012019", "02012019", "03012019"], * ["data1", 30, 200, 100] * ], * // Format specifier to parse as datetime for given 'x' string value * xFormat: "%m%d%Y" * }, * axis: { * x: { * type: "timeseries" * } * } * @see [D3's time specifier](https://github.com/d3/d3-time-format#locale_format) */ data_xFormat: "%Y-%m-%d",
/** * Set localtime format to parse x axis. * @name data․xLocaltime * @memberof Options * @type {boolean} * @default true * @example * data: { * xLocaltime: false * } */ data_xLocaltime: true,
/** * Sort on x axis. * @name data․xSort * @memberof Options * @type {boolean} * @default true * @example * data: { * xSort: false * } */ data_xSort: true,
/** * Set y axis the data related to. y and y2 can be used. * - **NOTE:** If all data is related to one of the axes, the domain of axis without related data will be replaced by the domain from the axis with related data * @name data․axes * @memberof Options * @type {object} * @default {} * @example * data: { * axes: { * data1: "y", * data2: "y2" * } * } */ data_axes: <{[key: string]: string}> {},
/** * Define regions for each data.<br> * The values must be an array for each data and it should include an object that has `start`, `end` and `style`. * - The object type should be as: * - start {number}: Start data point number. If not set, the start will be the first data point. * - [end] {number}: End data point number. If not set, the end will be the last data point. * - [style.dasharray="2 2"] {object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area. * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions. * @name data․regions * @memberof Options * @type {object} * @default {} * @example * data: { * regions: { * data1: [{ * start: 1, * end: 2, * style: { * dasharray: "5 2" * } * }, { * start: 3 * }], * ... * } * } */ data_regions: <{start?: number; end?: number; style?: {dasharray: string;}}[]> {},
/** * Set the stacking to be normalized * - **NOTE:** * - For stacking, '[data.groups](#.data%25E2%2580%25A4groups)' option should be set * - y Axis will be set in percentage value (0 ~ 100%) * - Must have postive values * @name data․stack․normalize * @memberof Options * @type {boolean} * @default false * @see [Demo](https://naver.github.io/billboard.js/demo/#Data.DataStackNormalized) * @example * data: { * stack: { * normalize: true * } * } */ data_stack_normalize: false};
billboardjs

Version Info

Tagged at
2 years ago