@nstudio/ncharts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +129 -0
- package/angular/fesm2022/nstudio-ncharts-angular.mjs +1059 -0
- package/angular/fesm2022/nstudio-ncharts-angular.mjs.map +1 -0
- package/angular/package.json +19 -0
- package/angular/types/nstudio-ncharts-angular.d.ts +175 -0
- package/charts/bar-chart.android.d.ts +29 -0
- package/charts/bar-chart.android.js +235 -0
- package/charts/bar-chart.android.js.map +1 -0
- package/charts/bar-chart.d.ts +14 -0
- package/charts/bar-chart.ios.d.ts +29 -0
- package/charts/bar-chart.ios.js +263 -0
- package/charts/bar-chart.ios.js.map +1 -0
- package/charts/bubble-chart.android.d.ts +26 -0
- package/charts/bubble-chart.android.js +189 -0
- package/charts/bubble-chart.android.js.map +1 -0
- package/charts/bubble-chart.d.ts +9 -0
- package/charts/bubble-chart.ios.d.ts +26 -0
- package/charts/bubble-chart.ios.js +225 -0
- package/charts/bubble-chart.ios.js.map +1 -0
- package/charts/candlestick-chart.android.d.ts +26 -0
- package/charts/candlestick-chart.android.js +236 -0
- package/charts/candlestick-chart.android.js.map +1 -0
- package/charts/candlestick-chart.d.ts +9 -0
- package/charts/candlestick-chart.ios.d.ts +26 -0
- package/charts/candlestick-chart.ios.js +248 -0
- package/charts/candlestick-chart.ios.js.map +1 -0
- package/charts/combined-chart.android.d.ts +26 -0
- package/charts/combined-chart.android.js +524 -0
- package/charts/combined-chart.android.js.map +1 -0
- package/charts/combined-chart.d.ts +9 -0
- package/charts/combined-chart.ios.d.ts +26 -0
- package/charts/combined-chart.ios.js +485 -0
- package/charts/combined-chart.ios.js.map +1 -0
- package/charts/index.android.d.ts +12 -0
- package/charts/index.android.js +13 -0
- package/charts/index.android.js.map +1 -0
- package/charts/index.d.ts +12 -0
- package/charts/index.ios.d.ts +12 -0
- package/charts/index.ios.js +13 -0
- package/charts/index.ios.js.map +1 -0
- package/charts/line-chart.android.d.ts +26 -0
- package/charts/line-chart.android.js +248 -0
- package/charts/line-chart.android.js.map +1 -0
- package/charts/line-chart.d.ts +9 -0
- package/charts/line-chart.ios.d.ts +26 -0
- package/charts/line-chart.ios.js +278 -0
- package/charts/line-chart.ios.js.map +1 -0
- package/charts/pie-chart.android.d.ts +24 -0
- package/charts/pie-chart.android.js +241 -0
- package/charts/pie-chart.android.js.map +1 -0
- package/charts/pie-chart.d.ts +9 -0
- package/charts/pie-chart.ios.d.ts +24 -0
- package/charts/pie-chart.ios.js +380 -0
- package/charts/pie-chart.ios.js.map +1 -0
- package/charts/radar-chart.android.d.ts +21 -0
- package/charts/radar-chart.android.js +217 -0
- package/charts/radar-chart.android.js.map +1 -0
- package/charts/radar-chart.d.ts +9 -0
- package/charts/radar-chart.ios.d.ts +21 -0
- package/charts/radar-chart.ios.js +241 -0
- package/charts/radar-chart.ios.js.map +1 -0
- package/charts/scatter-chart.android.d.ts +26 -0
- package/charts/scatter-chart.android.js +220 -0
- package/charts/scatter-chart.android.js.map +1 -0
- package/charts/scatter-chart.d.ts +9 -0
- package/charts/scatter-chart.ios.d.ts +26 -0
- package/charts/scatter-chart.ios.js +242 -0
- package/charts/scatter-chart.ios.js.map +1 -0
- package/charts/utils.d.ts +21 -0
- package/charts/utils.js +99 -0
- package/charts/utils.js.map +1 -0
- package/common.d.ts +300 -0
- package/common.js +464 -0
- package/common.js.map +1 -0
- package/index.android.d.ts +7 -0
- package/index.android.js +10 -0
- package/index.android.js.map +1 -0
- package/index.d.ts +14 -0
- package/index.ios.d.ts +7 -0
- package/index.ios.js +10 -0
- package/index.ios.js.map +1 -0
- package/nativescript.config.ts +14 -0
- package/nativescript.webpack.js +35 -0
- package/package.json +114 -0
- package/platforms/android/include.gradle +14 -0
- package/react/index.d.ts +6 -0
- package/react/index.js +6 -0
- package/react/index.js.map +1 -0
- package/react/register-elements.d.ts +1 -0
- package/react/register-elements.js +19 -0
- package/react/register-elements.js.map +1 -0
- package/solid/index.d.ts +6 -0
- package/solid/index.js +6 -0
- package/solid/index.js.map +1 -0
- package/solid/register-elements.d.ts +1 -0
- package/solid/register-elements.js +19 -0
- package/solid/register-elements.js.map +1 -0
- package/svelte/index.d.ts +6 -0
- package/svelte/index.js +6 -0
- package/svelte/index.js.map +1 -0
- package/svelte/register-elements.d.ts +1 -0
- package/svelte/register-elements.js +19 -0
- package/svelte/register-elements.js.map +1 -0
- package/types.d.ts +713 -0
- package/types.js +7 -0
- package/types.js.map +1 -0
- package/vue/index.d.ts +6 -0
- package/vue/index.js +6 -0
- package/vue/index.js.map +1 -0
- package/vue/register-elements.d.ts +1 -0
- package/vue/register-elements.js +19 -0
- package/vue/register-elements.js.map +1 -0
package/types.d.ts
ADDED
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nstudio/ncharts - TypeScript Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive type definitions for native charting with DGCharts (iOS) and MPAndroidChart (Android)
|
|
5
|
+
*/
|
|
6
|
+
import { EventData } from '@nativescript/core';
|
|
7
|
+
/**
|
|
8
|
+
* Color representation - accepts hex string, number, or Color instance
|
|
9
|
+
* Hex format: '#RRGGBB' or '#AARRGGBB'
|
|
10
|
+
* Number format: ARGB integer (Android convention: 0-255 alpha)
|
|
11
|
+
*/
|
|
12
|
+
export type ChartColor = string | number;
|
|
13
|
+
export type EasingFunction = 'Linear' | 'EaseInQuad' | 'EaseOutQuad' | 'EaseInOutQuad' | 'EaseInCubic' | 'EaseOutCubic' | 'EaseInOutCubic' | 'EaseInQuart' | 'EaseOutQuart' | 'EaseInOutQuart' | 'EaseInSine' | 'EaseOutSine' | 'EaseInOutSine' | 'EaseInExpo' | 'EaseOutExpo' | 'EaseInOutExpo' | 'EaseInCirc' | 'EaseOutCirc' | 'EaseInOutCirc' | 'EaseInElastic' | 'EaseOutElastic' | 'EaseInOutElastic' | 'EaseInBack' | 'EaseOutBack' | 'EaseInOutBack' | 'EaseInBounce' | 'EaseOutBounce' | 'EaseInOutBounce';
|
|
14
|
+
export interface ChartAnimation {
|
|
15
|
+
/** Duration for X-axis animation in milliseconds */
|
|
16
|
+
durationX?: number;
|
|
17
|
+
/** Duration for Y-axis animation in milliseconds */
|
|
18
|
+
durationY?: number;
|
|
19
|
+
/** Easing function for X-axis animation */
|
|
20
|
+
easingX?: EasingFunction;
|
|
21
|
+
/** Easing function for Y-axis animation */
|
|
22
|
+
easingY?: EasingFunction;
|
|
23
|
+
}
|
|
24
|
+
export type LegendHorizontalAlignment = 'LEFT' | 'CENTER' | 'RIGHT';
|
|
25
|
+
export type LegendVerticalAlignment = 'TOP' | 'CENTER' | 'BOTTOM';
|
|
26
|
+
export type LegendOrientation = 'HORIZONTAL' | 'VERTICAL';
|
|
27
|
+
export type LegendDirection = 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT';
|
|
28
|
+
export type LegendForm = 'NONE' | 'EMPTY' | 'DEFAULT' | 'SQUARE' | 'CIRCLE' | 'LINE';
|
|
29
|
+
export interface LegendCustomEntry {
|
|
30
|
+
colors: ChartColor[];
|
|
31
|
+
labels: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface LegendConfig {
|
|
34
|
+
/** Enable/disable legend */
|
|
35
|
+
enabled?: boolean;
|
|
36
|
+
/** Text color */
|
|
37
|
+
textColor?: ChartColor;
|
|
38
|
+
/** Text size in dp/pt */
|
|
39
|
+
textSize?: number;
|
|
40
|
+
/** Font family name */
|
|
41
|
+
fontFamily?: string;
|
|
42
|
+
/** Font style (0 = normal, 1 = bold, 2 = italic) */
|
|
43
|
+
fontStyle?: number;
|
|
44
|
+
/** Font weight */
|
|
45
|
+
fontWeight?: number;
|
|
46
|
+
/** Enable word wrapping */
|
|
47
|
+
wordWrapEnabled?: boolean;
|
|
48
|
+
/** Maximum size of legend as percentage of chart */
|
|
49
|
+
maxSizePercent?: number;
|
|
50
|
+
/** Horizontal alignment */
|
|
51
|
+
horizontalAlignment?: LegendHorizontalAlignment;
|
|
52
|
+
/** Vertical alignment */
|
|
53
|
+
verticalAlignment?: LegendVerticalAlignment;
|
|
54
|
+
/** Orientation */
|
|
55
|
+
orientation?: LegendOrientation;
|
|
56
|
+
/** Draw legend inside chart */
|
|
57
|
+
drawInside?: boolean;
|
|
58
|
+
/** Text direction */
|
|
59
|
+
direction?: LegendDirection;
|
|
60
|
+
/** Legend form shape */
|
|
61
|
+
form?: LegendForm;
|
|
62
|
+
/** Size of legend form */
|
|
63
|
+
formSize?: number;
|
|
64
|
+
/** Horizontal space between entries */
|
|
65
|
+
xEntrySpace?: number;
|
|
66
|
+
/** Vertical space between entries */
|
|
67
|
+
yEntrySpace?: number;
|
|
68
|
+
/** Space between form and text */
|
|
69
|
+
formToTextSpace?: number;
|
|
70
|
+
/** Custom legend entries */
|
|
71
|
+
custom?: LegendCustomEntry;
|
|
72
|
+
}
|
|
73
|
+
export interface ChartDescription {
|
|
74
|
+
/** Description text */
|
|
75
|
+
text?: string;
|
|
76
|
+
/** Text color */
|
|
77
|
+
textColor?: ChartColor;
|
|
78
|
+
/** Text size in dp/pt */
|
|
79
|
+
textSize?: number;
|
|
80
|
+
/** X position */
|
|
81
|
+
positionX?: number;
|
|
82
|
+
/** Y position */
|
|
83
|
+
positionY?: number;
|
|
84
|
+
}
|
|
85
|
+
export interface MarkerConfig {
|
|
86
|
+
/** Enable markers */
|
|
87
|
+
enabled?: boolean;
|
|
88
|
+
/** Decimal digits for values */
|
|
89
|
+
digits?: number;
|
|
90
|
+
/** Background color */
|
|
91
|
+
markerColor?: ChartColor;
|
|
92
|
+
/** Text color */
|
|
93
|
+
textColor?: ChartColor;
|
|
94
|
+
/** Text size in dp/pt */
|
|
95
|
+
textSize?: number;
|
|
96
|
+
}
|
|
97
|
+
export interface Highlight {
|
|
98
|
+
/** X value to highlight */
|
|
99
|
+
x: number;
|
|
100
|
+
/** Optional Y value */
|
|
101
|
+
y?: number;
|
|
102
|
+
/** Data set index */
|
|
103
|
+
dataSetIndex?: number;
|
|
104
|
+
/** Data index for combined charts */
|
|
105
|
+
dataIndex?: number;
|
|
106
|
+
/** Stack index for stacked bar charts */
|
|
107
|
+
stackIndex?: number;
|
|
108
|
+
}
|
|
109
|
+
export type AxisDependency = 'LEFT' | 'RIGHT';
|
|
110
|
+
export type XAxisPosition = 'TOP' | 'BOTTOM' | 'BOTH_SIDED' | 'TOP_INSIDE' | 'BOTTOM_INSIDE';
|
|
111
|
+
export type YAxisPosition = 'OUTSIDE_CHART' | 'INSIDE_CHART';
|
|
112
|
+
export type LimitLineLabelPosition = 'LEFT_TOP' | 'LEFT_BOTTOM' | 'RIGHT_TOP' | 'RIGHT_BOTTOM';
|
|
113
|
+
export interface LimitLine {
|
|
114
|
+
/** Limit value on axis */
|
|
115
|
+
limit: number;
|
|
116
|
+
/** Label text */
|
|
117
|
+
label?: string;
|
|
118
|
+
/** Line color */
|
|
119
|
+
lineColor?: ChartColor;
|
|
120
|
+
/** Line width */
|
|
121
|
+
lineWidth?: number;
|
|
122
|
+
/** Value text color */
|
|
123
|
+
valueTextColor?: ChartColor;
|
|
124
|
+
/** Value text size */
|
|
125
|
+
valueTextSize?: number;
|
|
126
|
+
/** Font family */
|
|
127
|
+
fontFamily?: string;
|
|
128
|
+
/** Label position */
|
|
129
|
+
labelPosition?: LimitLineLabelPosition;
|
|
130
|
+
/** Dashed line lengths */
|
|
131
|
+
lineDashLengths?: number[];
|
|
132
|
+
/** Dashed line phase */
|
|
133
|
+
lineDashPhase?: number;
|
|
134
|
+
}
|
|
135
|
+
export interface AxisBase {
|
|
136
|
+
/** Enable axis */
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
/** Draw grid lines */
|
|
139
|
+
drawGridLines?: boolean;
|
|
140
|
+
/** Draw axis line */
|
|
141
|
+
drawAxisLine?: boolean;
|
|
142
|
+
/** Draw labels */
|
|
143
|
+
drawLabels?: boolean;
|
|
144
|
+
/** Text color */
|
|
145
|
+
textColor?: ChartColor;
|
|
146
|
+
/** Text size */
|
|
147
|
+
textSize?: number;
|
|
148
|
+
/** Font family */
|
|
149
|
+
fontFamily?: string;
|
|
150
|
+
/** Font style */
|
|
151
|
+
fontStyle?: number;
|
|
152
|
+
/** Font weight */
|
|
153
|
+
fontWeight?: number;
|
|
154
|
+
/** Grid color */
|
|
155
|
+
gridColor?: ChartColor;
|
|
156
|
+
/** Grid line width */
|
|
157
|
+
gridLineWidth?: number;
|
|
158
|
+
/** Axis line color */
|
|
159
|
+
axisLineColor?: ChartColor;
|
|
160
|
+
/** Axis line width */
|
|
161
|
+
axisLineWidth?: number;
|
|
162
|
+
/** Grid dashed line lengths */
|
|
163
|
+
gridDashedLine?: {
|
|
164
|
+
lineLength: number;
|
|
165
|
+
spaceLength: number;
|
|
166
|
+
phase?: number;
|
|
167
|
+
};
|
|
168
|
+
/** Limit lines */
|
|
169
|
+
limitLines?: LimitLine[];
|
|
170
|
+
/** Draw limit line behind data */
|
|
171
|
+
drawLimitLinesBehindData?: boolean;
|
|
172
|
+
/** Minimum value */
|
|
173
|
+
axisMinimum?: number;
|
|
174
|
+
/** Maximum value */
|
|
175
|
+
axisMaximum?: number;
|
|
176
|
+
/** Invert axis */
|
|
177
|
+
inverted?: boolean;
|
|
178
|
+
/** Space at top as percentage */
|
|
179
|
+
spaceTop?: number;
|
|
180
|
+
/** Space at bottom as percentage */
|
|
181
|
+
spaceBottom?: number;
|
|
182
|
+
/** Label count */
|
|
183
|
+
labelCount?: number;
|
|
184
|
+
/** Force label count */
|
|
185
|
+
labelCountForce?: boolean;
|
|
186
|
+
/** Granularity */
|
|
187
|
+
granularity?: number;
|
|
188
|
+
/** Enable granularity */
|
|
189
|
+
granularityEnabled?: boolean;
|
|
190
|
+
/** Centered axis labels */
|
|
191
|
+
centerAxisLabels?: boolean;
|
|
192
|
+
/** Value formatter type */
|
|
193
|
+
valueFormatter?: 'largeValue' | 'percent' | 'date' | 'labelByXValue' | string | string[];
|
|
194
|
+
/** Value formatter pattern (for date) */
|
|
195
|
+
valueFormatterPattern?: string;
|
|
196
|
+
/** Label rotation angle in degrees */
|
|
197
|
+
labelRotationAngle?: number;
|
|
198
|
+
/** Avoid first label clipping */
|
|
199
|
+
avoidFirstLastClipping?: boolean;
|
|
200
|
+
}
|
|
201
|
+
export interface XAxisConfig extends AxisBase {
|
|
202
|
+
/** X axis position */
|
|
203
|
+
position?: XAxisPosition;
|
|
204
|
+
/** Y offset */
|
|
205
|
+
yOffset?: number;
|
|
206
|
+
}
|
|
207
|
+
export interface YAxisConfig extends AxisBase {
|
|
208
|
+
/** Y axis position */
|
|
209
|
+
position?: YAxisPosition;
|
|
210
|
+
/** Draw zero line */
|
|
211
|
+
zeroLine?: {
|
|
212
|
+
enabled?: boolean;
|
|
213
|
+
lineWidth?: number;
|
|
214
|
+
lineColor?: ChartColor;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
export interface YAxisConfigDual {
|
|
218
|
+
left?: YAxisConfig;
|
|
219
|
+
right?: YAxisConfig;
|
|
220
|
+
}
|
|
221
|
+
export interface ViewPortOffset {
|
|
222
|
+
left?: number;
|
|
223
|
+
top?: number;
|
|
224
|
+
right?: number;
|
|
225
|
+
bottom?: number;
|
|
226
|
+
}
|
|
227
|
+
export interface VisibleRange {
|
|
228
|
+
x?: {
|
|
229
|
+
min?: number;
|
|
230
|
+
max?: number;
|
|
231
|
+
};
|
|
232
|
+
y?: {
|
|
233
|
+
left?: {
|
|
234
|
+
min?: number;
|
|
235
|
+
max?: number;
|
|
236
|
+
};
|
|
237
|
+
right?: {
|
|
238
|
+
min?: number;
|
|
239
|
+
max?: number;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
export interface ZoomConfig {
|
|
244
|
+
scaleX: number;
|
|
245
|
+
scaleY: number;
|
|
246
|
+
xValue: number;
|
|
247
|
+
yValue: number;
|
|
248
|
+
axisDependency?: AxisDependency;
|
|
249
|
+
}
|
|
250
|
+
export interface DataSetConfigCommon {
|
|
251
|
+
/** Single color for dataset */
|
|
252
|
+
color?: ChartColor;
|
|
253
|
+
/** Multiple colors (one per entry or cycled) */
|
|
254
|
+
colors?: ChartColor[];
|
|
255
|
+
/** Enable highlighting */
|
|
256
|
+
highlightEnabled?: boolean;
|
|
257
|
+
/** Draw values on data points */
|
|
258
|
+
drawValues?: boolean;
|
|
259
|
+
/** Value text size */
|
|
260
|
+
valueTextSize?: number;
|
|
261
|
+
/** Value text color */
|
|
262
|
+
valueTextColor?: ChartColor;
|
|
263
|
+
/** Visibility */
|
|
264
|
+
visible?: boolean;
|
|
265
|
+
/** Value formatter */
|
|
266
|
+
valueFormatter?: 'largeValue' | 'percent' | 'date' | 'labelByXValue' | string | string[];
|
|
267
|
+
/** Value formatter pattern */
|
|
268
|
+
valueFormatterPattern?: string;
|
|
269
|
+
/** Labels for x values */
|
|
270
|
+
valueFormatterLabels?: Array<{
|
|
271
|
+
x: number;
|
|
272
|
+
label: string;
|
|
273
|
+
}>;
|
|
274
|
+
/** Y-axis dependency */
|
|
275
|
+
axisDependency?: AxisDependency;
|
|
276
|
+
}
|
|
277
|
+
export interface DataSetConfigBarLineScatterCandleBubble extends DataSetConfigCommon {
|
|
278
|
+
/** Highlight color */
|
|
279
|
+
highlightColor?: ChartColor;
|
|
280
|
+
}
|
|
281
|
+
export interface DataSetConfigLineScatterCandleRadar extends DataSetConfigBarLineScatterCandleBubble {
|
|
282
|
+
/** Draw vertical highlight indicator */
|
|
283
|
+
drawVerticalHighlightIndicator?: boolean;
|
|
284
|
+
/** Draw horizontal highlight indicator */
|
|
285
|
+
drawHorizontalHighlightIndicator?: boolean;
|
|
286
|
+
/** Highlight line width */
|
|
287
|
+
highlightLineWidth?: number;
|
|
288
|
+
}
|
|
289
|
+
export interface DataSetConfigLineRadar extends DataSetConfigLineScatterCandleRadar {
|
|
290
|
+
/** Fill gradient configuration */
|
|
291
|
+
fillGradient?: {
|
|
292
|
+
colors: ChartColor[];
|
|
293
|
+
/** iOS: gradient positions (0-1), Android: orientation */
|
|
294
|
+
positions?: number[];
|
|
295
|
+
/** iOS: gradient angle in degrees */
|
|
296
|
+
angle?: number;
|
|
297
|
+
/** Android: gradient orientation */
|
|
298
|
+
orientation?: 'TOP_BOTTOM' | 'TR_BL' | 'RIGHT_LEFT' | 'BR_TL' | 'BOTTOM_TOP' | 'BL_TR' | 'LEFT_RIGHT' | 'TL_BR';
|
|
299
|
+
};
|
|
300
|
+
/** Fill color (solid) */
|
|
301
|
+
fillColor?: ChartColor;
|
|
302
|
+
/** Fill alpha (0-255) */
|
|
303
|
+
fillAlpha?: number;
|
|
304
|
+
/** Enable fill */
|
|
305
|
+
drawFilled?: boolean;
|
|
306
|
+
/** Line width (0.2 - 10) */
|
|
307
|
+
lineWidth?: number;
|
|
308
|
+
}
|
|
309
|
+
export type LineChartMode = 'LINEAR' | 'STEPPED' | 'CUBIC_BEZIER' | 'HORIZONTAL_BEZIER';
|
|
310
|
+
export interface LineDataSetConfig extends DataSetConfigLineRadar {
|
|
311
|
+
/** Circle radius at data points */
|
|
312
|
+
circleRadius?: number;
|
|
313
|
+
/** Draw circles at data points */
|
|
314
|
+
drawCircles?: boolean;
|
|
315
|
+
/** Line mode */
|
|
316
|
+
mode?: LineChartMode;
|
|
317
|
+
/** Cubic bezier intensity (0-1) */
|
|
318
|
+
drawCubicIntensity?: number;
|
|
319
|
+
/** Single circle color */
|
|
320
|
+
circleColor?: ChartColor;
|
|
321
|
+
/** Multiple circle colors */
|
|
322
|
+
circleColors?: ChartColor[];
|
|
323
|
+
/** Circle hole color */
|
|
324
|
+
circleHoleColor?: ChartColor;
|
|
325
|
+
/** Draw circle hole */
|
|
326
|
+
drawCircleHole?: boolean;
|
|
327
|
+
/** Dashed line configuration */
|
|
328
|
+
dashedLine?: {
|
|
329
|
+
lineLength: number;
|
|
330
|
+
spaceLength: number;
|
|
331
|
+
phase?: number;
|
|
332
|
+
};
|
|
333
|
+
/** Fill formatter for custom fill area */
|
|
334
|
+
fillFormatter?: {
|
|
335
|
+
min: number;
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
export interface LineDataEntry {
|
|
339
|
+
x?: number;
|
|
340
|
+
y: number;
|
|
341
|
+
marker?: string;
|
|
342
|
+
icon?: {
|
|
343
|
+
bundle: object;
|
|
344
|
+
width?: number;
|
|
345
|
+
height?: number;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
export interface LineDataSet {
|
|
349
|
+
values: Array<LineDataEntry | number>;
|
|
350
|
+
label: string;
|
|
351
|
+
config?: LineDataSetConfig;
|
|
352
|
+
}
|
|
353
|
+
export interface LineChartData {
|
|
354
|
+
dataSets: LineDataSet[];
|
|
355
|
+
}
|
|
356
|
+
export interface BarDataSetConfig extends DataSetConfigBarLineScatterCandleBubble {
|
|
357
|
+
/** Bar shadow color */
|
|
358
|
+
barShadowColor?: ChartColor;
|
|
359
|
+
/** Highlight alpha (0-255) */
|
|
360
|
+
highlightAlpha?: number;
|
|
361
|
+
/** Labels for stacked bars */
|
|
362
|
+
stackLabels?: string[];
|
|
363
|
+
}
|
|
364
|
+
export interface BarDataEntry {
|
|
365
|
+
x?: number;
|
|
366
|
+
y: number | number[];
|
|
367
|
+
marker?: string | string[];
|
|
368
|
+
}
|
|
369
|
+
export interface BarDataSet {
|
|
370
|
+
values: Array<BarDataEntry | number | number[]>;
|
|
371
|
+
label: string;
|
|
372
|
+
config?: BarDataSetConfig;
|
|
373
|
+
}
|
|
374
|
+
export interface BarChartDataConfig {
|
|
375
|
+
barWidth?: number;
|
|
376
|
+
group?: {
|
|
377
|
+
fromX: number;
|
|
378
|
+
groupSpace: number;
|
|
379
|
+
barSpace: number;
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
export interface BarChartData {
|
|
383
|
+
dataSets: BarDataSet[];
|
|
384
|
+
config?: BarChartDataConfig;
|
|
385
|
+
}
|
|
386
|
+
export type ValuePosition = 'INSIDE_SLICE' | 'OUTSIDE_SLICE';
|
|
387
|
+
export interface PieDataSetConfig extends DataSetConfigCommon {
|
|
388
|
+
/** Space between slices */
|
|
389
|
+
sliceSpace?: number;
|
|
390
|
+
/** Selection shift amount */
|
|
391
|
+
selectionShift?: number;
|
|
392
|
+
/** X value label position */
|
|
393
|
+
xValuePosition?: ValuePosition;
|
|
394
|
+
/** Y value label position */
|
|
395
|
+
yValuePosition?: ValuePosition;
|
|
396
|
+
/** Value line part 1 length */
|
|
397
|
+
valueLinePart1Length?: number;
|
|
398
|
+
/** Value line part 2 length */
|
|
399
|
+
valueLinePart2Length?: number;
|
|
400
|
+
/** Value line color */
|
|
401
|
+
valueLineColor?: ChartColor;
|
|
402
|
+
/** Value line width */
|
|
403
|
+
valueLineWidth?: number;
|
|
404
|
+
/** Value line part 1 offset percentage */
|
|
405
|
+
valueLinePart1OffsetPercentage?: number;
|
|
406
|
+
/** Value line variable length */
|
|
407
|
+
valueLineVariableLength?: boolean;
|
|
408
|
+
}
|
|
409
|
+
export interface PieDataEntry {
|
|
410
|
+
value: number;
|
|
411
|
+
label?: string;
|
|
412
|
+
}
|
|
413
|
+
export interface PieDataSet {
|
|
414
|
+
values: Array<PieDataEntry | number>;
|
|
415
|
+
label: string;
|
|
416
|
+
config?: PieDataSetConfig;
|
|
417
|
+
}
|
|
418
|
+
export interface PieChartData {
|
|
419
|
+
dataSets: PieDataSet[];
|
|
420
|
+
}
|
|
421
|
+
export type ScatterShape = 'SQUARE' | 'CIRCLE' | 'TRIANGLE' | 'CROSS' | 'X';
|
|
422
|
+
export interface ScatterDataSetConfig extends DataSetConfigLineScatterCandleRadar {
|
|
423
|
+
/** Scatter shape size */
|
|
424
|
+
scatterShapeSize?: number;
|
|
425
|
+
/** Scatter shape type */
|
|
426
|
+
scatterShape?: ScatterShape;
|
|
427
|
+
/** Shape hole color */
|
|
428
|
+
scatterShapeHoleColor?: ChartColor;
|
|
429
|
+
/** Shape hole radius */
|
|
430
|
+
scatterShapeHoleRadius?: number;
|
|
431
|
+
}
|
|
432
|
+
export interface ScatterDataEntry {
|
|
433
|
+
x?: number;
|
|
434
|
+
y: number;
|
|
435
|
+
marker?: string;
|
|
436
|
+
}
|
|
437
|
+
export interface ScatterDataSet {
|
|
438
|
+
values: Array<ScatterDataEntry | number>;
|
|
439
|
+
label: string;
|
|
440
|
+
config?: ScatterDataSetConfig;
|
|
441
|
+
}
|
|
442
|
+
export interface ScatterChartData {
|
|
443
|
+
dataSets: ScatterDataSet[];
|
|
444
|
+
}
|
|
445
|
+
export interface BubbleDataSetConfig extends DataSetConfigBarLineScatterCandleBubble {
|
|
446
|
+
}
|
|
447
|
+
export interface BubbleDataEntry {
|
|
448
|
+
x?: number;
|
|
449
|
+
y: number;
|
|
450
|
+
size: number;
|
|
451
|
+
marker?: string;
|
|
452
|
+
}
|
|
453
|
+
export interface BubbleDataSet {
|
|
454
|
+
values: BubbleDataEntry[];
|
|
455
|
+
label: string;
|
|
456
|
+
config?: BubbleDataSetConfig;
|
|
457
|
+
}
|
|
458
|
+
export interface BubbleChartData {
|
|
459
|
+
dataSets: BubbleDataSet[];
|
|
460
|
+
}
|
|
461
|
+
export type PaintStyle = 'FILL' | 'STROKE' | 'FILL_AND_STROKE';
|
|
462
|
+
export interface CandleDataSetConfig extends DataSetConfigLineScatterCandleRadar {
|
|
463
|
+
/** Space between candles */
|
|
464
|
+
barSpace?: number;
|
|
465
|
+
/** Shadow width */
|
|
466
|
+
shadowWidth?: number;
|
|
467
|
+
/** Shadow color */
|
|
468
|
+
shadowColor?: ChartColor;
|
|
469
|
+
/** Use same color as candle for shadow */
|
|
470
|
+
shadowColorSameAsCandle?: boolean;
|
|
471
|
+
/** Neutral color (open == close) */
|
|
472
|
+
neutralColor?: ChartColor;
|
|
473
|
+
/** Decreasing candle color */
|
|
474
|
+
decreasingColor?: ChartColor;
|
|
475
|
+
/** Decreasing candle paint style */
|
|
476
|
+
decreasingPaintStyle?: PaintStyle;
|
|
477
|
+
/** Increasing candle color */
|
|
478
|
+
increasingColor?: ChartColor;
|
|
479
|
+
/** Increasing candle paint style */
|
|
480
|
+
increasingPaintStyle?: PaintStyle;
|
|
481
|
+
}
|
|
482
|
+
export interface CandleDataEntry {
|
|
483
|
+
x?: number;
|
|
484
|
+
shadowH: number;
|
|
485
|
+
shadowL: number;
|
|
486
|
+
open: number;
|
|
487
|
+
close: number;
|
|
488
|
+
marker?: string;
|
|
489
|
+
}
|
|
490
|
+
export interface CandleDataSet {
|
|
491
|
+
values: CandleDataEntry[];
|
|
492
|
+
label: string;
|
|
493
|
+
config?: CandleDataSetConfig;
|
|
494
|
+
}
|
|
495
|
+
export interface CandleChartData {
|
|
496
|
+
dataSets: CandleDataSet[];
|
|
497
|
+
}
|
|
498
|
+
export interface RadarDataSetConfig extends DataSetConfigLineRadar {
|
|
499
|
+
}
|
|
500
|
+
export interface RadarDataEntry {
|
|
501
|
+
value: number;
|
|
502
|
+
}
|
|
503
|
+
export interface RadarDataSet {
|
|
504
|
+
values: Array<RadarDataEntry | number>;
|
|
505
|
+
label: string;
|
|
506
|
+
config?: RadarDataSetConfig;
|
|
507
|
+
}
|
|
508
|
+
export interface RadarChartData {
|
|
509
|
+
dataSets: RadarDataSet[];
|
|
510
|
+
labels?: string[];
|
|
511
|
+
}
|
|
512
|
+
export interface CombinedChartData {
|
|
513
|
+
lineData?: LineChartData;
|
|
514
|
+
barData?: BarChartData;
|
|
515
|
+
scatterData?: ScatterChartData;
|
|
516
|
+
candleData?: CandleChartData;
|
|
517
|
+
bubbleData?: BubbleChartData;
|
|
518
|
+
}
|
|
519
|
+
export interface ChartSelectData {
|
|
520
|
+
x: number;
|
|
521
|
+
y: number;
|
|
522
|
+
dataSetIndex: number;
|
|
523
|
+
dataIndex: number;
|
|
524
|
+
data?: any;
|
|
525
|
+
}
|
|
526
|
+
export interface ChartSelectEvent extends EventData {
|
|
527
|
+
data: ChartSelectData;
|
|
528
|
+
}
|
|
529
|
+
export interface ChartGestureEvent {
|
|
530
|
+
type: 'pan' | 'scale' | 'rotate' | 'single-tap' | 'double-tap' | 'long-press';
|
|
531
|
+
state: 'began' | 'changed' | 'ended' | 'cancelled';
|
|
532
|
+
scaleX?: number;
|
|
533
|
+
scaleY?: number;
|
|
534
|
+
centerX?: number;
|
|
535
|
+
centerY?: number;
|
|
536
|
+
}
|
|
537
|
+
export interface YAxisMinMaxChangeEvent {
|
|
538
|
+
left?: {
|
|
539
|
+
min: number;
|
|
540
|
+
max: number;
|
|
541
|
+
};
|
|
542
|
+
right?: {
|
|
543
|
+
min: number;
|
|
544
|
+
max: number;
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
export interface ChartBaseConfig {
|
|
548
|
+
/** Animation configuration */
|
|
549
|
+
animation?: ChartAnimation;
|
|
550
|
+
/** Chart background color */
|
|
551
|
+
chartBackgroundColor?: ChartColor;
|
|
552
|
+
/** Enable logging */
|
|
553
|
+
logEnabled?: boolean;
|
|
554
|
+
/** Text displayed when no data */
|
|
555
|
+
noDataText?: string;
|
|
556
|
+
/** Color of no data text */
|
|
557
|
+
noDataTextColor?: ChartColor;
|
|
558
|
+
/** Enable touch gestures */
|
|
559
|
+
touchEnabled?: boolean;
|
|
560
|
+
/** Enable drag deceleration */
|
|
561
|
+
dragDecelerationEnabled?: boolean;
|
|
562
|
+
/** Drag deceleration friction (0-1) */
|
|
563
|
+
dragDecelerationFrictionCoef?: number;
|
|
564
|
+
/** Enable highlight on tap */
|
|
565
|
+
highlightPerTapEnabled?: boolean;
|
|
566
|
+
/** Chart description */
|
|
567
|
+
chartDescription?: ChartDescription;
|
|
568
|
+
/** Legend configuration */
|
|
569
|
+
legend?: LegendConfig;
|
|
570
|
+
/** X-axis configuration */
|
|
571
|
+
xAxis?: XAxisConfig;
|
|
572
|
+
/** Marker configuration */
|
|
573
|
+
marker?: MarkerConfig;
|
|
574
|
+
/** Highlighted values */
|
|
575
|
+
highlights?: Highlight[];
|
|
576
|
+
}
|
|
577
|
+
export interface BarLineChartBaseConfig extends ChartBaseConfig {
|
|
578
|
+
/** Maximum highlight distance */
|
|
579
|
+
maxHighlightDistance?: number;
|
|
580
|
+
/** Draw grid background */
|
|
581
|
+
drawGridBackground?: boolean;
|
|
582
|
+
/** Grid background color */
|
|
583
|
+
gridBackgroundColor?: ChartColor;
|
|
584
|
+
/** Draw chart borders */
|
|
585
|
+
drawBorders?: boolean;
|
|
586
|
+
/** Border color */
|
|
587
|
+
borderColor?: ChartColor;
|
|
588
|
+
/** Border width */
|
|
589
|
+
borderWidth?: number;
|
|
590
|
+
/** Minimum offset from edges */
|
|
591
|
+
minOffset?: number;
|
|
592
|
+
/** Maximum visible value count */
|
|
593
|
+
maxVisibleValueCount?: number;
|
|
594
|
+
/** Visible range configuration */
|
|
595
|
+
visibleRange?: VisibleRange;
|
|
596
|
+
/** Auto scale min/max */
|
|
597
|
+
autoScaleMinMaxEnabled?: boolean;
|
|
598
|
+
/** Keep position on rotation */
|
|
599
|
+
keepPositionOnRotation?: boolean;
|
|
600
|
+
/** Enable highlight on drag */
|
|
601
|
+
highlightPerDragEnabled?: boolean;
|
|
602
|
+
/** Enable scaling */
|
|
603
|
+
scaleEnabled?: boolean;
|
|
604
|
+
/** Enable X-axis scaling */
|
|
605
|
+
scaleXEnabled?: boolean;
|
|
606
|
+
/** Enable Y-axis scaling */
|
|
607
|
+
scaleYEnabled?: boolean;
|
|
608
|
+
/** Enable dragging */
|
|
609
|
+
dragEnabled?: boolean;
|
|
610
|
+
/** Enable pinch zoom */
|
|
611
|
+
pinchZoom?: boolean;
|
|
612
|
+
/** Enable double tap zoom */
|
|
613
|
+
doubleTapToZoomEnabled?: boolean;
|
|
614
|
+
/** Y-axis configuration */
|
|
615
|
+
yAxis?: YAxisConfigDual;
|
|
616
|
+
/** Zoom configuration */
|
|
617
|
+
zoom?: ZoomConfig;
|
|
618
|
+
/** View port offsets */
|
|
619
|
+
viewPortOffsets?: ViewPortOffset;
|
|
620
|
+
/** Extra offsets */
|
|
621
|
+
extraOffsets?: ViewPortOffset;
|
|
622
|
+
/** Group identifier for synced charts */
|
|
623
|
+
group?: string;
|
|
624
|
+
/** Chart identifier within group */
|
|
625
|
+
identifier?: string;
|
|
626
|
+
/** Sync X-axis across group */
|
|
627
|
+
syncX?: boolean;
|
|
628
|
+
/** Sync Y-axis across group */
|
|
629
|
+
syncY?: boolean;
|
|
630
|
+
}
|
|
631
|
+
export interface PieRadarChartBaseConfig extends ChartBaseConfig {
|
|
632
|
+
/** Rotation angle */
|
|
633
|
+
rotationAngle?: number;
|
|
634
|
+
/** Enable rotation */
|
|
635
|
+
rotationEnabled?: boolean;
|
|
636
|
+
/** Minimum offset */
|
|
637
|
+
minOffset?: number;
|
|
638
|
+
}
|
|
639
|
+
export interface PieChartConfig extends PieRadarChartBaseConfig {
|
|
640
|
+
/** Draw hole in center */
|
|
641
|
+
drawHole?: boolean;
|
|
642
|
+
/** Hole radius as percentage */
|
|
643
|
+
holeRadius?: number;
|
|
644
|
+
/** Transparent circle radius */
|
|
645
|
+
transparentCircleRadius?: number;
|
|
646
|
+
/** Hole color */
|
|
647
|
+
holeColor?: ChartColor;
|
|
648
|
+
/** Transparent circle color */
|
|
649
|
+
transparentCircleColor?: ChartColor;
|
|
650
|
+
/** Draw center text */
|
|
651
|
+
drawCenterText?: boolean;
|
|
652
|
+
/** Center text */
|
|
653
|
+
centerText?: string;
|
|
654
|
+
/** Center text color */
|
|
655
|
+
centerTextColor?: ChartColor;
|
|
656
|
+
/** Center text size */
|
|
657
|
+
centerTextSize?: number;
|
|
658
|
+
/** Draw slice labels */
|
|
659
|
+
drawSliceText?: boolean;
|
|
660
|
+
/** Use percentage values */
|
|
661
|
+
usePercentValues?: boolean;
|
|
662
|
+
/** Maximum angle for highlighting */
|
|
663
|
+
maxAngle?: number;
|
|
664
|
+
/** Entry label text color */
|
|
665
|
+
entryLabelColor?: ChartColor;
|
|
666
|
+
/** Entry label text size */
|
|
667
|
+
entryLabelTextSize?: number;
|
|
668
|
+
}
|
|
669
|
+
export interface RadarChartConfig extends PieRadarChartBaseConfig {
|
|
670
|
+
/** Y-axis configuration */
|
|
671
|
+
yAxis?: YAxisConfig;
|
|
672
|
+
/** Draw web lines */
|
|
673
|
+
drawWeb?: boolean;
|
|
674
|
+
/** Web line width */
|
|
675
|
+
webLineWidth?: number;
|
|
676
|
+
/** Web line width inner */
|
|
677
|
+
webLineWidthInner?: number;
|
|
678
|
+
/** Web alpha (0-255) */
|
|
679
|
+
webAlpha?: number;
|
|
680
|
+
/** Web color */
|
|
681
|
+
webColor?: ChartColor;
|
|
682
|
+
/** Web color inner */
|
|
683
|
+
webColorInner?: ChartColor;
|
|
684
|
+
/** Skip web line count */
|
|
685
|
+
skipWebLineCount?: number;
|
|
686
|
+
}
|
|
687
|
+
export interface LineChartProps extends BarLineChartBaseConfig {
|
|
688
|
+
data: LineChartData;
|
|
689
|
+
}
|
|
690
|
+
export interface BarChartProps extends BarLineChartBaseConfig {
|
|
691
|
+
data: BarChartData;
|
|
692
|
+
}
|
|
693
|
+
export interface HorizontalBarChartProps extends BarLineChartBaseConfig {
|
|
694
|
+
data: BarChartData;
|
|
695
|
+
}
|
|
696
|
+
export interface PieChartProps extends PieChartConfig {
|
|
697
|
+
data: PieChartData;
|
|
698
|
+
}
|
|
699
|
+
export interface ScatterChartProps extends BarLineChartBaseConfig {
|
|
700
|
+
data: ScatterChartData;
|
|
701
|
+
}
|
|
702
|
+
export interface BubbleChartProps extends BarLineChartBaseConfig {
|
|
703
|
+
data: BubbleChartData;
|
|
704
|
+
}
|
|
705
|
+
export interface CandleStickChartProps extends BarLineChartBaseConfig {
|
|
706
|
+
data: CandleChartData;
|
|
707
|
+
}
|
|
708
|
+
export interface RadarChartProps extends RadarChartConfig {
|
|
709
|
+
data: RadarChartData;
|
|
710
|
+
}
|
|
711
|
+
export interface CombinedChartProps extends BarLineChartBaseConfig {
|
|
712
|
+
data: CombinedChartData;
|
|
713
|
+
}
|