-
Notifications
You must be signed in to change notification settings - Fork 18
/
d-chart-axis-base-options.ts
215 lines (191 loc) · 7.92 KB
/
d-chart-axis-base-options.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
import { DChartAxisOptions } from "./d-chart-axis";
import { DChartAxisGuide } from "./d-chart-axis-guide";
import { DChartAxisPosition } from "./d-chart-axis-position";
import { DChartAxisTickPosition } from "./d-chart-axis-tick-position";
import { DChartCoordinateTickMajorStepFunction } from "./d-chart-coordinate-tick-major-step-function";
import { DChartCoordinateTickMinorStepFunction } from "./d-chart-coordinate-tick-minor-step-function";
import { EShapePointsStyle } from "./shape/e-shape-points-style";
import { EShapePointsStyleOption } from "./shape/e-shape-points-styles";
import { EShapeStrokeSide } from "./shape/e-shape-stroke-side";
import { EShapeStrokeStyle } from "./shape/e-shape-stroke-style";
import { EShapeTextStyle, EShapeTextWeight } from "./shape/e-shape-text";
import { EShapeTextAlignLike } from "./shape/e-shape-text-align";
import { EShapeTextAlignHorizontal } from "./shape/e-shape-text-align-horizontal";
import { EShapeTextAlignVertical } from "./shape/e-shape-text-align-vertical";
import { EShapeTextDirection } from "./shape/e-shape-text-direction";
import { EShapeTextOffsetLike } from "./shape/e-shape-text-offset";
import { EShapeTextOutlineLike } from "./shape/e-shape-text-outline";
import { NumberFormatterFunction } from "./util/number-formatter-function";
export type DChartAxisBaseTextWeightOption = EShapeTextWeight | keyof typeof EShapeTextWeight;
export type DChartAxisBaseTextStyleOption = EShapeTextStyle | keyof typeof EShapeTextStyle;
export type DChartAxisBaseTextDirectionOption =
| EShapeTextDirection
| keyof typeof EShapeTextDirection;
export interface DChartAxisBaseTickTextOptions {
/** A format. Please refer to {@link NumberFormatter} for format details. */
format?: string | null;
/** A formatter function. */
formatter?: NumberFormatterFunction;
color?: number;
alpha?: number;
family?: string;
size?: number;
weight?: DChartAxisBaseTextWeightOption;
align?: Partial<EShapeTextAlignLike>;
offset?: Partial<EShapeTextOffsetLike>;
style?: DChartAxisBaseTextStyleOption;
outline?: Partial<EShapeTextOutlineLike>;
spacing?: Partial<EShapeTextOffsetLike>;
direction?: DChartAxisBaseTextDirectionOption;
padding?: Partial<EShapeTextOffsetLike>;
clipping?: boolean;
}
export interface DChartAxisBaseStrokeOptions {
enable?: boolean;
color?: number;
alpha?: number;
width?: number;
align?: number;
side?: EShapeStrokeSide;
style?:
| EShapeStrokeStyle
| keyof typeof EShapeStrokeStyle
| Array<keyof typeof EShapeStrokeStyle>;
}
export interface DChartAxisBaseTickMajorGridlineOptions {
enable?: boolean;
style?: EShapePointsStyleOption;
stroke?: DChartAxisBaseStrokeOptions;
}
export type DChartAxisTickPositionOption =
| DChartAxisTickPosition
| keyof typeof DChartAxisTickPosition;
export interface DChartAxisBaseTickMajorOptions {
count?: number;
capacity?: number;
step?: number | DChartCoordinateTickMajorStepFunction;
size?: number;
position?: DChartAxisTickPositionOption;
style?: EShapePointsStyleOption;
stroke?: DChartAxisBaseStrokeOptions;
text?: DChartAxisBaseTickTextOptions;
gridline?: DChartAxisBaseTickMajorGridlineOptions;
}
export interface DChartAxisBaseTickMinorOptions {
count?: number;
step?: number | DChartCoordinateTickMinorStepFunction;
size?: number;
position?: DChartAxisTickPositionOption;
style?: EShapePointsStyleOption;
stroke?: DChartAxisBaseStrokeOptions;
text?: DChartAxisBaseTickTextOptions;
}
export interface DChartAxisBaseTickOptions {
enable?: boolean;
position?: DChartAxisTickPositionOption;
style?: EShapePointsStyleOption;
stroke?: DChartAxisBaseStrokeOptions;
major?: DChartAxisBaseTickMajorOptions;
minor?: DChartAxisBaseTickMinorOptions;
}
export interface DChartAxisBaseLabelOptions {
value?: string;
color?: number;
alpha?: number;
family?: string;
size?: number;
weight?: DChartAxisBaseTextWeightOption;
align?: Partial<EShapeTextAlignLike>;
offset?: Partial<EShapeTextOffsetLike>;
style?: DChartAxisBaseTextStyleOption;
outline?: Partial<EShapeTextOutlineLike>;
spacing?: Partial<EShapeTextOffsetLike>;
direction?: DChartAxisBaseTextDirectionOption;
padding?: Partial<EShapeTextOffsetLike>;
clipping?: boolean;
}
export interface DChartAxisBaseGuideOptions {
list?: DChartAxisGuide[];
}
export interface DChartAxisBaseOptions<THEME extends DThemeChartAxisBase = DThemeChartAxisBase>
extends DChartAxisOptions {
tick?: DChartAxisBaseTickOptions;
label?: DChartAxisBaseLabelOptions;
style?: EShapePointsStyle;
stroke?: DChartAxisBaseStrokeOptions;
coordinate?: number;
padding?: number;
theme?: THEME;
guide?: DChartAxisBaseGuideOptions;
}
export interface DThemeChartAxisBase {
getPosition(): DChartAxisPosition;
getPadding(): number;
getLabelAlignHorizontal(position: DChartAxisPosition): EShapeTextAlignHorizontal;
getLabelAlignVertical(position: DChartAxisPosition): EShapeTextAlignVertical;
getLabelPaddingHorizontal(): number;
getLabelPaddingVertical(): number;
getLabelDirection(): EShapeTextDirection;
getLabelColor(): number | undefined;
getStyle(): EShapePointsStyle | undefined;
getStrokeEnable(): boolean | undefined;
getStrokeColor(): number | undefined;
getStrokeAlpha(): number | undefined;
getStrokeWidth(): number | undefined;
getStrokeAlign(): number | undefined;
getStrokeSide(): EShapeStrokeSide | undefined;
getStrokeStyle(): EShapeStrokeStyle | undefined;
getTickEnable(): boolean;
getMajorTickCount(): number;
getMajorTickCapacity(count: number): number;
getMajorTickStep(): number | DChartCoordinateTickMajorStepFunction | undefined;
getMajorTickSize(): number;
getMajorTickPosition(): DChartAxisTickPosition;
getMajorTickStyle(): EShapePointsStyle | undefined;
getMajorTickTextAlignHorizontal(position: DChartAxisPosition): EShapeTextAlignHorizontal;
getMajorTickTextAlignVertical(position: DChartAxisPosition): EShapeTextAlignVertical;
getMajorTickTextDirection(): EShapeTextDirection;
getMajorTickTextFormat(): string | undefined;
getMajorTickTextColor(): number | undefined;
getMajorTickTextPaddingHorizontal(): number;
getMajorTickTextPaddingVertical(): number;
getMajorTickStrokeEnable(): boolean | undefined;
getMajorTickStrokeColor(): number | undefined;
getMajorTickStrokeAlpha(): number | undefined;
getMajorTickStrokeWidth(): number | undefined;
getMajorTickStrokeAlign(): number | undefined;
getMajorTickStrokeSide(): EShapeStrokeSide | undefined;
getMajorTickStrokeStyle(): EShapeStrokeStyle | undefined;
getMajorTickGridlineEnable(): boolean;
getMajorTickGridlineStyle(): EShapePointsStyle | undefined;
getMajorTickGridlineStrokeEnable(): boolean | undefined;
getMajorTickGridlineStrokeColor(): number | undefined;
getMajorTickGridlineStrokeAlpha(): number | undefined;
getMajorTickGridlineStrokeWidth(): number | undefined;
getMajorTickGridlineStrokeAlign(): number | undefined;
getMajorTickGridlineStrokeSide(): EShapeStrokeSide | undefined;
getMajorTickGridlineStrokeStyle(): EShapeStrokeStyle | undefined;
getMinorTickCount(): number;
getMinorTickStep(): number | DChartCoordinateTickMinorStepFunction | undefined;
getMinorTickSize(): number;
getMinorTickPosition(): DChartAxisTickPosition;
getMinorTickStyle(): EShapePointsStyle | undefined;
getMinorTickTextAlignHorizontal(position: DChartAxisPosition): EShapeTextAlignHorizontal;
getMinorTickTextAlignVertical(position: DChartAxisPosition): EShapeTextAlignVertical;
getMinorTickTextDirection(): EShapeTextDirection;
getMinorTickTextFormat(): string | undefined;
getMinorTickTextColor(): number | undefined;
getMinorTickTextPaddingHorizontal(): number;
getMinorTickTextPaddingVertical(): number;
getMinorTickStrokeEnable(): boolean | undefined;
getMinorTickStrokeColor(): number | undefined;
getMinorTickStrokeAlpha(): number | undefined;
getMinorTickStrokeWidth(): number | undefined;
getMinorTickStrokeAlign(): number | undefined;
getMinorTickStrokeSide(): EShapeStrokeSide | undefined;
getMinorTickStrokeStyle(): EShapeStrokeStyle | undefined;
}