@trismegisto/charts 3.3.14 → 3.4.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/README.md +36 -25
- package/dist/core/bar-chart.d.ts +12 -0
- package/dist/core/bar-chart.js +30 -0
- package/dist/core/bar-chart.js.map +1 -0
- package/dist/core/boxplot-chart.d.ts +15 -0
- package/dist/core/boxplot-chart.js +45 -0
- package/dist/core/boxplot-chart.js.map +1 -0
- package/dist/core/bullet-chart.d.ts +29 -0
- package/dist/core/bullet-chart.js +95 -0
- package/dist/core/bullet-chart.js.map +1 -0
- package/dist/core/calendar-heatmap.d.ts +18 -0
- package/dist/core/calendar-heatmap.js +79 -0
- package/dist/core/calendar-heatmap.js.map +1 -0
- package/dist/core/chart-host.d.ts +19 -0
- package/dist/core/chart-host.js +109 -0
- package/dist/core/chart-host.js.map +1 -0
- package/dist/core/charts-i18n.d.ts +25 -0
- package/dist/core/charts-i18n.js +33 -0
- package/dist/core/charts-i18n.js.map +1 -0
- package/dist/core/charts-messages.d.ts +88 -0
- package/dist/core/charts-messages.en.d.ts +2 -0
- package/dist/core/charts-messages.en.js +106 -0
- package/dist/core/charts-messages.en.js.map +1 -0
- package/dist/core/charts-messages.es.d.ts +2 -0
- package/dist/core/charts-messages.es.js +106 -0
- package/dist/core/charts-messages.es.js.map +1 -0
- package/dist/core/charts-messages.js +106 -0
- package/dist/core/charts-messages.js.map +1 -0
- package/dist/core/context.d.ts +22 -0
- package/dist/core/context.js +13 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/engine-locale.d.ts +3 -0
- package/dist/core/engine-locale.js +59 -0
- package/dist/core/engine-locale.js.map +1 -0
- package/dist/core/format.d.ts +13 -0
- package/dist/core/format.js +64 -0
- package/dist/core/format.js.map +1 -0
- package/dist/core/frame.d.ts +19 -0
- package/dist/core/frame.js +28 -0
- package/dist/core/frame.js.map +1 -0
- package/dist/core/funnel-chart.d.ts +8 -0
- package/dist/core/funnel-chart.js +33 -0
- package/dist/core/funnel-chart.js.map +1 -0
- package/dist/core/gauge-chart.d.ts +44 -0
- package/dist/core/gauge-chart.js +218 -0
- package/dist/core/gauge-chart.js.map +1 -0
- package/dist/core/gauge-layout.d.ts +67 -0
- package/dist/core/gauge-layout.js +140 -0
- package/dist/core/gauge-layout.js.map +1 -0
- package/dist/core/heatmap-chart.d.ts +17 -0
- package/dist/core/heatmap-chart.js +55 -0
- package/dist/core/heatmap-chart.js.map +1 -0
- package/dist/core/index.d.ts +32 -0
- package/dist/core/index.js +38 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/line-chart.d.ts +12 -0
- package/dist/core/line-chart.js +29 -0
- package/dist/core/line-chart.js.map +1 -0
- package/dist/core/navigation.d.ts +25 -0
- package/dist/core/navigation.js +57 -0
- package/dist/core/navigation.js.map +1 -0
- package/dist/core/observe.d.ts +28 -0
- package/dist/core/observe.js +115 -0
- package/dist/core/observe.js.map +1 -0
- package/dist/core/options.d.ts +27 -0
- package/dist/core/options.js +64 -0
- package/dist/core/options.js.map +1 -0
- package/dist/core/pie-chart.d.ts +9 -0
- package/dist/core/pie-chart.js +34 -0
- package/dist/core/pie-chart.js.map +1 -0
- package/dist/core/radar-chart.d.ts +18 -0
- package/dist/core/radar-chart.js +34 -0
- package/dist/core/radar-chart.js.map +1 -0
- package/dist/core/sankey-chart.d.ts +15 -0
- package/dist/core/sankey-chart.js +32 -0
- package/dist/core/sankey-chart.js.map +1 -0
- package/dist/core/scatter-chart.d.ts +33 -0
- package/dist/core/scatter-chart.js +62 -0
- package/dist/core/scatter-chart.js.map +1 -0
- package/dist/core/sparkline-chart.d.ts +20 -0
- package/dist/core/sparkline-chart.js +60 -0
- package/dist/core/sparkline-chart.js.map +1 -0
- package/dist/core/stats.d.ts +12 -0
- package/dist/core/stats.js +23 -0
- package/dist/core/stats.js.map +1 -0
- package/dist/core/theme.d.ts +8 -0
- package/dist/core/theme.js +171 -0
- package/dist/core/theme.js.map +1 -0
- package/dist/core/treemap-chart.d.ts +21 -0
- package/dist/core/treemap-chart.js +45 -0
- package/dist/core/treemap-chart.js.map +1 -0
- package/dist/core/types.d.ts +10 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/view.d.ts +24 -0
- package/dist/core/view.js +2 -0
- package/dist/core/view.js.map +1 -0
- package/dist/core/waterfall-chart.d.ts +32 -0
- package/dist/core/waterfall-chart.js +115 -0
- package/dist/core/waterfall-chart.js.map +1 -0
- package/dist/engine/aria.d.ts +8 -0
- package/dist/engine/aria.js +70 -0
- package/dist/engine/aria.js.map +1 -0
- package/dist/engine/component/legend.d.ts +11 -0
- package/dist/engine/component/legend.js +349 -0
- package/dist/engine/component/legend.js.map +1 -0
- package/dist/engine/component/text-style.d.ts +6 -0
- package/dist/engine/component/text-style.js +26 -0
- package/dist/engine/component/text-style.js.map +1 -0
- package/dist/engine/component/title.d.ts +2 -0
- package/dist/engine/component/title.js +90 -0
- package/dist/engine/component/title.js.map +1 -0
- package/dist/engine/component/tooltip.d.ts +40 -0
- package/dist/engine/component/tooltip.js +418 -0
- package/dist/engine/component/tooltip.js.map +1 -0
- package/dist/engine/component/visual-map.d.ts +9 -0
- package/dist/engine/component/visual-map.js +381 -0
- package/dist/engine/component/visual-map.js.map +1 -0
- package/dist/engine/contract.d.ts +504 -0
- package/dist/engine/contract.js +10 -0
- package/dist/engine/contract.js.map +1 -0
- package/dist/engine/coord/axis.d.ts +55 -0
- package/dist/engine/coord/axis.js +349 -0
- package/dist/engine/coord/axis.js.map +1 -0
- package/dist/engine/coord/calendar.d.ts +44 -0
- package/dist/engine/coord/calendar.js +282 -0
- package/dist/engine/coord/calendar.js.map +1 -0
- package/dist/engine/coord/cartesian.d.ts +22 -0
- package/dist/engine/coord/cartesian.js +449 -0
- package/dist/engine/coord/cartesian.js.map +1 -0
- package/dist/engine/coord/polar.d.ts +24 -0
- package/dist/engine/coord/polar.js +232 -0
- package/dist/engine/coord/polar.js.map +1 -0
- package/dist/engine/coord/radar.d.ts +90 -0
- package/dist/engine/coord/radar.js +288 -0
- package/dist/engine/coord/radar.js.map +1 -0
- package/dist/engine/index.d.ts +27 -0
- package/dist/engine/index.js +16 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/instance.d.ts +79 -0
- package/dist/engine/instance.js +773 -0
- package/dist/engine/instance.js.map +1 -0
- package/dist/engine/label-layout.d.ts +3 -0
- package/dist/engine/label-layout.js +35 -0
- package/dist/engine/label-layout.js.map +1 -0
- package/dist/engine/locale.d.ts +9 -0
- package/dist/engine/locale.js +154 -0
- package/dist/engine/locale.js.map +1 -0
- package/dist/engine/model.d.ts +26 -0
- package/dist/engine/model.js +307 -0
- package/dist/engine/model.js.map +1 -0
- package/dist/engine/option/axis.d.ts +167 -0
- package/dist/engine/option/axis.js +2 -0
- package/dist/engine/option/axis.js.map +1 -0
- package/dist/engine/option/components.d.ts +424 -0
- package/dist/engine/option/components.js +2 -0
- package/dist/engine/option/components.js.map +1 -0
- package/dist/engine/option.d.ts +59 -0
- package/dist/engine/option.js +2 -0
- package/dist/engine/option.js.map +1 -0
- package/dist/engine/registry.d.ts +9 -0
- package/dist/engine/registry.js +42 -0
- package/dist/engine/registry.js.map +1 -0
- package/dist/engine/render/path.d.ts +26 -0
- package/dist/engine/render/path.js +387 -0
- package/dist/engine/render/path.js.map +1 -0
- package/dist/engine/render/svg.d.ts +60 -0
- package/dist/engine/render/svg.js +624 -0
- package/dist/engine/render/svg.js.map +1 -0
- package/dist/engine/render/text.d.ts +13 -0
- package/dist/engine/render/text.js +144 -0
- package/dist/engine/render/text.js.map +1 -0
- package/dist/engine/scale.d.ts +38 -0
- package/dist/engine/scale.js +170 -0
- package/dist/engine/scale.js.map +1 -0
- package/dist/engine/series/bar.d.ts +65 -0
- package/dist/engine/series/bar.js +417 -0
- package/dist/engine/series/bar.js.map +1 -0
- package/dist/engine/series/boxplot.d.ts +31 -0
- package/dist/engine/series/boxplot.js +125 -0
- package/dist/engine/series/boxplot.js.map +1 -0
- package/dist/engine/series/cartesian-data.d.ts +38 -0
- package/dist/engine/series/cartesian-data.js +159 -0
- package/dist/engine/series/cartesian-data.js.map +1 -0
- package/dist/engine/series/circular-common.d.ts +51 -0
- package/dist/engine/series/circular-common.js +196 -0
- package/dist/engine/series/circular-common.js.map +1 -0
- package/dist/engine/series/circular-options.d.ts +151 -0
- package/dist/engine/series/circular-options.js +2 -0
- package/dist/engine/series/circular-options.js.map +1 -0
- package/dist/engine/series/common.d.ts +51 -0
- package/dist/engine/series/common.js +210 -0
- package/dist/engine/series/common.js.map +1 -0
- package/dist/engine/series/funnel.d.ts +37 -0
- package/dist/engine/series/funnel.js +204 -0
- package/dist/engine/series/funnel.js.map +1 -0
- package/dist/engine/series/gauge.d.ts +106 -0
- package/dist/engine/series/gauge.js +349 -0
- package/dist/engine/series/gauge.js.map +1 -0
- package/dist/engine/series/heatmap.d.ts +31 -0
- package/dist/engine/series/heatmap.js +222 -0
- package/dist/engine/series/heatmap.js.map +1 -0
- package/dist/engine/series/label-fit.d.ts +7 -0
- package/dist/engine/series/label-fit.js +56 -0
- package/dist/engine/series/label-fit.js.map +1 -0
- package/dist/engine/series/line.d.ts +63 -0
- package/dist/engine/series/line.js +347 -0
- package/dist/engine/series/line.js.map +1 -0
- package/dist/engine/series/pie.d.ts +59 -0
- package/dist/engine/series/pie.js +396 -0
- package/dist/engine/series/pie.js.map +1 -0
- package/dist/engine/series/radar.d.ts +34 -0
- package/dist/engine/series/radar.js +168 -0
- package/dist/engine/series/radar.js.map +1 -0
- package/dist/engine/series/sankey.d.ts +64 -0
- package/dist/engine/series/sankey.js +486 -0
- package/dist/engine/series/sankey.js.map +1 -0
- package/dist/engine/series/scatter.d.ts +38 -0
- package/dist/engine/series/scatter.js +167 -0
- package/dist/engine/series/scatter.js.map +1 -0
- package/dist/engine/series/treemap.d.ts +77 -0
- package/dist/engine/series/treemap.js +493 -0
- package/dist/engine/series/treemap.js.map +1 -0
- package/dist/engine/theme.d.ts +9 -0
- package/dist/engine/theme.js +84 -0
- package/dist/engine/theme.js.map +1 -0
- package/dist/engine/util.d.ts +68 -0
- package/dist/engine/util.js +269 -0
- package/dist/engine/util.js.map +1 -0
- package/package.json +35 -24
- package/fesm2022/trismegisto-charts.mjs +0 -12428
- package/fesm2022/trismegisto-charts.mjs.map +0 -1
- package/types/trismegisto-charts.d.ts +0 -1970
- package/types/trismegisto-charts.d.ts.map +0 -1
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import type { Gradient } from '../contract';
|
|
2
|
+
/** Cor: texto CSS ou gradiente (`{ type: 'linear', x, y, x2, y2, colorStops }`). */
|
|
3
|
+
export type ColorValue = string | Gradient;
|
|
4
|
+
export type LayoutPosition = number | string;
|
|
5
|
+
export interface BoxLayoutOption {
|
|
6
|
+
left?: LayoutPosition;
|
|
7
|
+
top?: LayoutPosition;
|
|
8
|
+
right?: LayoutPosition;
|
|
9
|
+
bottom?: LayoutPosition;
|
|
10
|
+
width?: LayoutPosition;
|
|
11
|
+
height?: LayoutPosition;
|
|
12
|
+
}
|
|
13
|
+
export interface TextStyleOption {
|
|
14
|
+
color?: string;
|
|
15
|
+
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
16
|
+
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number | string;
|
|
17
|
+
fontFamily?: string;
|
|
18
|
+
fontSize?: number;
|
|
19
|
+
lineHeight?: number;
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
overflow?: 'none' | 'truncate' | 'break' | 'breakAll';
|
|
23
|
+
ellipsis?: string;
|
|
24
|
+
textBorderColor?: string;
|
|
25
|
+
textBorderWidth?: number;
|
|
26
|
+
textShadowColor?: string;
|
|
27
|
+
textShadowBlur?: number;
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
borderColor?: string;
|
|
30
|
+
borderWidth?: number;
|
|
31
|
+
borderRadius?: number | number[];
|
|
32
|
+
padding?: number | number[];
|
|
33
|
+
align?: 'left' | 'center' | 'right';
|
|
34
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
35
|
+
opacity?: number;
|
|
36
|
+
/** Estilos nomeados para `{nome|texto}` (rich text). */
|
|
37
|
+
rich?: Record<string, TextStyleOption>;
|
|
38
|
+
}
|
|
39
|
+
export interface ShadowOption {
|
|
40
|
+
shadowBlur?: number;
|
|
41
|
+
shadowColor?: string;
|
|
42
|
+
shadowOffsetX?: number;
|
|
43
|
+
shadowOffsetY?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface LineStyleOption extends ShadowOption {
|
|
46
|
+
color?: ColorValue;
|
|
47
|
+
width?: number;
|
|
48
|
+
type?: 'solid' | 'dashed' | 'dotted' | number | number[];
|
|
49
|
+
dashOffset?: number;
|
|
50
|
+
cap?: 'butt' | 'round' | 'square';
|
|
51
|
+
join?: 'bevel' | 'round' | 'miter';
|
|
52
|
+
opacity?: number;
|
|
53
|
+
/** Curvatura (sankey, linhas de grafo). */
|
|
54
|
+
curveness?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface ItemStyleOption extends ShadowOption {
|
|
57
|
+
color?: ColorValue | ((params: any) => ColorValue);
|
|
58
|
+
borderColor?: ColorValue;
|
|
59
|
+
borderWidth?: number;
|
|
60
|
+
borderType?: 'solid' | 'dashed' | 'dotted' | number | number[];
|
|
61
|
+
borderRadius?: number | number[];
|
|
62
|
+
borderCap?: 'butt' | 'round' | 'square';
|
|
63
|
+
opacity?: number;
|
|
64
|
+
decal?: Partial<DecalOption> | 'none';
|
|
65
|
+
/** Treemap: espaço entre filhos e saturação por nível. */
|
|
66
|
+
gapWidth?: number;
|
|
67
|
+
borderColorSaturation?: number;
|
|
68
|
+
colorAlpha?: number;
|
|
69
|
+
colorSaturation?: number;
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
}
|
|
72
|
+
export interface AreaStyleOption extends ShadowOption {
|
|
73
|
+
color?: ColorValue;
|
|
74
|
+
opacity?: number;
|
|
75
|
+
origin?: 'auto' | 'start' | 'end' | number;
|
|
76
|
+
}
|
|
77
|
+
export type LabelFormatter = string | ((params: any) => string);
|
|
78
|
+
export interface LabelOption extends TextStyleOption {
|
|
79
|
+
show?: boolean;
|
|
80
|
+
position?: string | (number | string)[];
|
|
81
|
+
distance?: number;
|
|
82
|
+
rotate?: number;
|
|
83
|
+
offset?: [number, number];
|
|
84
|
+
formatter?: LabelFormatter;
|
|
85
|
+
valueAnimation?: boolean;
|
|
86
|
+
minMargin?: number;
|
|
87
|
+
/** Pizza: alinhamento das linhas guia. */
|
|
88
|
+
alignTo?: 'none' | 'labelLine' | 'edge';
|
|
89
|
+
edgeDistance?: number | string;
|
|
90
|
+
bleedMargin?: number;
|
|
91
|
+
silent?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface LabelLineOption {
|
|
94
|
+
show?: boolean;
|
|
95
|
+
showAbove?: boolean;
|
|
96
|
+
length?: number;
|
|
97
|
+
length2?: number;
|
|
98
|
+
smooth?: boolean | number;
|
|
99
|
+
minTurnAngle?: number;
|
|
100
|
+
lineStyle?: LineStyleOption;
|
|
101
|
+
}
|
|
102
|
+
export interface LabelLayoutOption {
|
|
103
|
+
hideOverlap?: boolean;
|
|
104
|
+
moveOverlap?: 'shiftX' | 'shiftY';
|
|
105
|
+
x?: number | string;
|
|
106
|
+
y?: number | string;
|
|
107
|
+
dx?: number;
|
|
108
|
+
dy?: number;
|
|
109
|
+
rotate?: number;
|
|
110
|
+
align?: 'left' | 'center' | 'right';
|
|
111
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
112
|
+
fontSize?: number;
|
|
113
|
+
draggable?: boolean;
|
|
114
|
+
}
|
|
115
|
+
export interface EmphasisOption {
|
|
116
|
+
disabled?: boolean;
|
|
117
|
+
/** O que esmaecer ao destacar: nada, a própria série ou todo o resto. */
|
|
118
|
+
focus?: 'none' | 'self' | 'series' | 'ancestor' | 'descendant' | 'adjacency';
|
|
119
|
+
blurScope?: 'coordinateSystem' | 'series' | 'global';
|
|
120
|
+
scale?: boolean | number;
|
|
121
|
+
itemStyle?: ItemStyleOption;
|
|
122
|
+
lineStyle?: LineStyleOption;
|
|
123
|
+
areaStyle?: AreaStyleOption;
|
|
124
|
+
label?: LabelOption;
|
|
125
|
+
labelLine?: LabelLineOption;
|
|
126
|
+
}
|
|
127
|
+
export interface StateOption {
|
|
128
|
+
itemStyle?: ItemStyleOption;
|
|
129
|
+
lineStyle?: LineStyleOption;
|
|
130
|
+
areaStyle?: AreaStyleOption;
|
|
131
|
+
label?: LabelOption;
|
|
132
|
+
}
|
|
133
|
+
export interface DecalOption {
|
|
134
|
+
symbol: string | string[];
|
|
135
|
+
symbolSize: number;
|
|
136
|
+
symbolKeepAspect: boolean;
|
|
137
|
+
color: string;
|
|
138
|
+
backgroundColor: string;
|
|
139
|
+
dashArrayX: number | number[];
|
|
140
|
+
dashArrayY: number | number[];
|
|
141
|
+
rotation: number;
|
|
142
|
+
maxTileWidth: number;
|
|
143
|
+
maxTileHeight: number;
|
|
144
|
+
}
|
|
145
|
+
export interface TitleOption extends BoxLayoutOption {
|
|
146
|
+
id?: string;
|
|
147
|
+
show?: boolean;
|
|
148
|
+
text?: string;
|
|
149
|
+
link?: string;
|
|
150
|
+
target?: 'self' | 'blank';
|
|
151
|
+
textStyle?: TextStyleOption;
|
|
152
|
+
subtext?: string;
|
|
153
|
+
sublink?: string;
|
|
154
|
+
subtarget?: 'self' | 'blank';
|
|
155
|
+
subtextStyle?: TextStyleOption;
|
|
156
|
+
textAlign?: 'auto' | 'left' | 'center' | 'right';
|
|
157
|
+
textVerticalAlign?: 'auto' | 'top' | 'middle' | 'bottom';
|
|
158
|
+
triggerEvent?: boolean;
|
|
159
|
+
padding?: number | number[];
|
|
160
|
+
itemGap?: number;
|
|
161
|
+
zlevel?: number;
|
|
162
|
+
z?: number;
|
|
163
|
+
backgroundColor?: string;
|
|
164
|
+
borderColor?: string;
|
|
165
|
+
borderWidth?: number;
|
|
166
|
+
borderRadius?: number | number[];
|
|
167
|
+
}
|
|
168
|
+
export interface LegendDataItem {
|
|
169
|
+
name: string;
|
|
170
|
+
icon?: string;
|
|
171
|
+
itemStyle?: ItemStyleOption;
|
|
172
|
+
lineStyle?: LineStyleOption;
|
|
173
|
+
textStyle?: TextStyleOption;
|
|
174
|
+
inactiveColor?: string;
|
|
175
|
+
}
|
|
176
|
+
export interface LegendOption extends BoxLayoutOption {
|
|
177
|
+
id?: string;
|
|
178
|
+
type?: 'plain' | 'scroll';
|
|
179
|
+
show?: boolean;
|
|
180
|
+
orient?: 'horizontal' | 'vertical';
|
|
181
|
+
align?: 'auto' | 'left' | 'right';
|
|
182
|
+
padding?: number | number[];
|
|
183
|
+
itemGap?: number;
|
|
184
|
+
itemWidth?: number;
|
|
185
|
+
itemHeight?: number;
|
|
186
|
+
itemStyle?: ItemStyleOption;
|
|
187
|
+
lineStyle?: LineStyleOption;
|
|
188
|
+
symbolRotate?: number | 'inherit';
|
|
189
|
+
formatter?: string | ((name: string) => string);
|
|
190
|
+
selectedMode?: boolean | 'single' | 'multiple';
|
|
191
|
+
inactiveColor?: string;
|
|
192
|
+
inactiveBorderColor?: string;
|
|
193
|
+
inactiveBorderWidth?: number | 'auto';
|
|
194
|
+
selected?: Record<string, boolean>;
|
|
195
|
+
textStyle?: TextStyleOption;
|
|
196
|
+
tooltip?: TooltipOption;
|
|
197
|
+
icon?: string;
|
|
198
|
+
data?: (string | LegendDataItem)[];
|
|
199
|
+
backgroundColor?: string;
|
|
200
|
+
borderColor?: string;
|
|
201
|
+
borderWidth?: number;
|
|
202
|
+
borderRadius?: number | number[];
|
|
203
|
+
/** Scroll: índice do primeiro item da página atual. */
|
|
204
|
+
scrollDataIndex?: number;
|
|
205
|
+
pageButtonItemGap?: number;
|
|
206
|
+
pageButtonGap?: number;
|
|
207
|
+
pageButtonPosition?: 'start' | 'end';
|
|
208
|
+
pageFormatter?: string | ((params: {
|
|
209
|
+
current: number;
|
|
210
|
+
total: number;
|
|
211
|
+
}) => string);
|
|
212
|
+
pageIconColor?: string;
|
|
213
|
+
pageIconInactiveColor?: string;
|
|
214
|
+
pageIconSize?: number | number[];
|
|
215
|
+
pageTextStyle?: TextStyleOption;
|
|
216
|
+
animation?: boolean;
|
|
217
|
+
animationDurationUpdate?: number;
|
|
218
|
+
zlevel?: number;
|
|
219
|
+
z?: number;
|
|
220
|
+
}
|
|
221
|
+
export interface AxisPointerOption {
|
|
222
|
+
show?: boolean | 'auto';
|
|
223
|
+
type?: 'line' | 'shadow' | 'cross' | 'none';
|
|
224
|
+
axis?: 'auto' | 'x' | 'y' | 'radius' | 'angle';
|
|
225
|
+
snap?: boolean;
|
|
226
|
+
z?: number;
|
|
227
|
+
label?: LabelOption & {
|
|
228
|
+
precision?: number | 'auto';
|
|
229
|
+
margin?: number;
|
|
230
|
+
};
|
|
231
|
+
lineStyle?: LineStyleOption;
|
|
232
|
+
shadowStyle?: ItemStyleOption;
|
|
233
|
+
crossStyle?: LineStyleOption;
|
|
234
|
+
triggerTooltip?: boolean;
|
|
235
|
+
value?: number;
|
|
236
|
+
status?: 'show' | 'hide';
|
|
237
|
+
link?: unknown[];
|
|
238
|
+
animation?: boolean;
|
|
239
|
+
}
|
|
240
|
+
export type TooltipPositionCallback = (point: [number, number], params: unknown, dom: HTMLElement, rect: {
|
|
241
|
+
x: number;
|
|
242
|
+
y: number;
|
|
243
|
+
width: number;
|
|
244
|
+
height: number;
|
|
245
|
+
} | null, size: {
|
|
246
|
+
contentSize: [number, number];
|
|
247
|
+
viewSize: [number, number];
|
|
248
|
+
}) => (number | string)[] | Record<string, number | string>;
|
|
249
|
+
export interface TooltipOption {
|
|
250
|
+
show?: boolean;
|
|
251
|
+
trigger?: 'item' | 'axis' | 'none';
|
|
252
|
+
axisPointer?: AxisPointerOption;
|
|
253
|
+
showContent?: boolean;
|
|
254
|
+
alwaysShowContent?: boolean;
|
|
255
|
+
triggerOn?: 'mousemove' | 'click' | 'mousemove|click' | 'none';
|
|
256
|
+
showDelay?: number;
|
|
257
|
+
hideDelay?: number;
|
|
258
|
+
enterable?: boolean;
|
|
259
|
+
renderMode?: 'html' | 'richText';
|
|
260
|
+
confine?: boolean;
|
|
261
|
+
appendToBody?: boolean;
|
|
262
|
+
appendTo?: string | HTMLElement | ((chartContainer: HTMLElement) => HTMLElement | undefined | null);
|
|
263
|
+
className?: string;
|
|
264
|
+
transitionDuration?: number;
|
|
265
|
+
position?: (number | string)[] | 'inside' | 'top' | 'left' | 'right' | 'bottom' | TooltipPositionCallback | Record<string, number | string>;
|
|
266
|
+
formatter?: string | ((params: any, ticket: string, callback: (ticket: string, html: string) => void) => string | HTMLElement | HTMLElement[]);
|
|
267
|
+
valueFormatter?: (value: unknown, dataIndex: number) => string;
|
|
268
|
+
backgroundColor?: string;
|
|
269
|
+
borderColor?: string;
|
|
270
|
+
borderWidth?: number;
|
|
271
|
+
borderRadius?: number;
|
|
272
|
+
padding?: number | number[];
|
|
273
|
+
textStyle?: TextStyleOption;
|
|
274
|
+
extraCssText?: string;
|
|
275
|
+
order?: 'seriesAsc' | 'seriesDesc' | 'valueAsc' | 'valueDesc';
|
|
276
|
+
shadowBlur?: number;
|
|
277
|
+
shadowColor?: string;
|
|
278
|
+
shadowOffsetX?: number;
|
|
279
|
+
shadowOffsetY?: number;
|
|
280
|
+
}
|
|
281
|
+
export interface VisualChannels {
|
|
282
|
+
color?: string | string[];
|
|
283
|
+
colorAlpha?: number | number[];
|
|
284
|
+
opacity?: number | number[];
|
|
285
|
+
colorLightness?: number | number[];
|
|
286
|
+
colorSaturation?: number | number[];
|
|
287
|
+
colorHue?: number | number[];
|
|
288
|
+
symbol?: string | string[];
|
|
289
|
+
symbolSize?: number | number[];
|
|
290
|
+
}
|
|
291
|
+
interface VisualMapBase extends BoxLayoutOption {
|
|
292
|
+
id?: string;
|
|
293
|
+
show?: boolean;
|
|
294
|
+
dimension?: number;
|
|
295
|
+
seriesIndex?: number | number[];
|
|
296
|
+
inverse?: boolean;
|
|
297
|
+
orient?: 'vertical' | 'horizontal';
|
|
298
|
+
align?: 'auto' | 'left' | 'right' | 'top' | 'bottom';
|
|
299
|
+
itemWidth?: number;
|
|
300
|
+
itemHeight?: number;
|
|
301
|
+
itemGap?: number;
|
|
302
|
+
itemSymbol?: string;
|
|
303
|
+
hoverLink?: boolean;
|
|
304
|
+
inRange?: VisualChannels;
|
|
305
|
+
outOfRange?: VisualChannels;
|
|
306
|
+
controller?: {
|
|
307
|
+
inRange?: VisualChannels;
|
|
308
|
+
outOfRange?: VisualChannels;
|
|
309
|
+
};
|
|
310
|
+
text?: [string, string];
|
|
311
|
+
textGap?: number;
|
|
312
|
+
textStyle?: TextStyleOption;
|
|
313
|
+
precision?: number;
|
|
314
|
+
formatter?: string | ((value: number, value2?: number) => string);
|
|
315
|
+
padding?: number | number[];
|
|
316
|
+
backgroundColor?: string;
|
|
317
|
+
borderColor?: string;
|
|
318
|
+
borderWidth?: number;
|
|
319
|
+
/** Cor do controle (atalho para inRange.color). */
|
|
320
|
+
color?: string[];
|
|
321
|
+
zlevel?: number;
|
|
322
|
+
z?: number;
|
|
323
|
+
}
|
|
324
|
+
export interface ContinuousVisualMapOption extends VisualMapBase {
|
|
325
|
+
type?: 'continuous';
|
|
326
|
+
min?: number;
|
|
327
|
+
max?: number;
|
|
328
|
+
range?: [number, number];
|
|
329
|
+
calculable?: boolean;
|
|
330
|
+
realtime?: boolean;
|
|
331
|
+
handleIcon?: string;
|
|
332
|
+
handleSize?: number | string;
|
|
333
|
+
handleStyle?: ItemStyleOption;
|
|
334
|
+
indicatorIcon?: string;
|
|
335
|
+
indicatorSize?: number | string;
|
|
336
|
+
indicatorStyle?: ItemStyleOption;
|
|
337
|
+
}
|
|
338
|
+
export interface VisualPiece extends VisualChannels {
|
|
339
|
+
min?: number;
|
|
340
|
+
max?: number;
|
|
341
|
+
lt?: number;
|
|
342
|
+
lte?: number;
|
|
343
|
+
gt?: number;
|
|
344
|
+
gte?: number;
|
|
345
|
+
value?: number;
|
|
346
|
+
label?: string;
|
|
347
|
+
}
|
|
348
|
+
export interface PiecewiseVisualMapOption extends VisualMapBase {
|
|
349
|
+
type: 'piecewise';
|
|
350
|
+
min?: number;
|
|
351
|
+
max?: number;
|
|
352
|
+
splitNumber?: number;
|
|
353
|
+
pieces?: VisualPiece[];
|
|
354
|
+
categories?: string[];
|
|
355
|
+
selectedMode?: 'multiple' | 'single' | boolean;
|
|
356
|
+
selected?: Record<string, boolean>;
|
|
357
|
+
minOpen?: boolean;
|
|
358
|
+
maxOpen?: boolean;
|
|
359
|
+
showLabel?: boolean;
|
|
360
|
+
}
|
|
361
|
+
export type VisualMapOption = ContinuousVisualMapOption | PiecewiseVisualMapOption;
|
|
362
|
+
export interface AriaLabelOption {
|
|
363
|
+
enabled?: boolean;
|
|
364
|
+
description?: string;
|
|
365
|
+
general?: {
|
|
366
|
+
withTitle?: string;
|
|
367
|
+
withoutTitle?: string;
|
|
368
|
+
};
|
|
369
|
+
series?: {
|
|
370
|
+
maxCount?: number;
|
|
371
|
+
single?: {
|
|
372
|
+
prefix?: string;
|
|
373
|
+
withName?: string;
|
|
374
|
+
withoutName?: string;
|
|
375
|
+
};
|
|
376
|
+
multiple?: {
|
|
377
|
+
prefix?: string;
|
|
378
|
+
withName?: string;
|
|
379
|
+
withoutName?: string;
|
|
380
|
+
separator?: {
|
|
381
|
+
middle?: string;
|
|
382
|
+
end?: string;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
data?: {
|
|
387
|
+
maxCount?: number;
|
|
388
|
+
allData?: string;
|
|
389
|
+
partialData?: string;
|
|
390
|
+
withName?: string;
|
|
391
|
+
withoutName?: string;
|
|
392
|
+
separator?: {
|
|
393
|
+
middle?: string;
|
|
394
|
+
end?: string;
|
|
395
|
+
};
|
|
396
|
+
excludeDimensionId?: number[];
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
export interface AriaOption {
|
|
400
|
+
enabled?: boolean;
|
|
401
|
+
label?: AriaLabelOption;
|
|
402
|
+
decal?: {
|
|
403
|
+
show?: boolean;
|
|
404
|
+
decals?: Partial<DecalOption> | Partial<DecalOption>[];
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
export interface DimensionDefinition {
|
|
408
|
+
name?: string;
|
|
409
|
+
type?: 'number' | 'float' | 'int' | 'ordinal' | 'time';
|
|
410
|
+
displayName?: string;
|
|
411
|
+
}
|
|
412
|
+
export interface DatasetOption {
|
|
413
|
+
id?: string;
|
|
414
|
+
/** Linhas (array de arrays, a primeira pode ser cabeçalho) ou objetos por linha, ou colunas (objeto de arrays). */
|
|
415
|
+
source?: unknown[][] | Record<string, unknown>[] | Record<string, unknown[]>;
|
|
416
|
+
dimensions?: (string | DimensionDefinition)[];
|
|
417
|
+
sourceHeader?: boolean | number | 'auto';
|
|
418
|
+
fromDatasetIndex?: number;
|
|
419
|
+
fromDatasetId?: string;
|
|
420
|
+
transform?: unknown;
|
|
421
|
+
}
|
|
422
|
+
/** `encode`: qual dimensão do dataset vai para cada canal da série (`{ x: 0, y: 'vendas', itemName: 'nome' }`). */
|
|
423
|
+
export type EncodeOption = Record<string, number | string | (number | string)[]>;
|
|
424
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/engine/option/components.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { AngleAxisOption, GridOption, PolarOption, RadiusAxisOption, XAXisOption, YAXisOption } from './option/axis';
|
|
2
|
+
import type { AriaOption, ColorValue, DatasetOption, LegendOption, TextStyleOption, TitleOption, TooltipOption, VisualMapOption } from './option/components';
|
|
3
|
+
import type { CalendarOption } from './coord/calendar';
|
|
4
|
+
import type { RadarOption } from './coord/radar';
|
|
5
|
+
import type { BarSeriesOption } from './series/bar';
|
|
6
|
+
import type { BoxplotSeriesOption } from './series/boxplot';
|
|
7
|
+
import type { FunnelSeriesOption } from './series/funnel';
|
|
8
|
+
import type { GaugeSeriesOption } from './series/gauge';
|
|
9
|
+
import type { HeatmapSeriesOption } from './series/heatmap';
|
|
10
|
+
import type { LineSeriesOption } from './series/line';
|
|
11
|
+
import type { PieSeriesOption } from './series/pie';
|
|
12
|
+
import type { RadarSeriesOption } from './series/radar';
|
|
13
|
+
import type { SankeySeriesOption } from './series/sankey';
|
|
14
|
+
import type { ScatterSeriesOption } from './series/scatter';
|
|
15
|
+
import type { TreemapSeriesOption } from './series/treemap';
|
|
16
|
+
export type SeriesOption = BarSeriesOption | LineSeriesOption | ScatterSeriesOption | BoxplotSeriesOption | PieSeriesOption | FunnelSeriesOption | GaugeSeriesOption | RadarSeriesOption | HeatmapSeriesOption | TreemapSeriesOption | SankeySeriesOption;
|
|
17
|
+
type OneOrMany<T> = T | T[];
|
|
18
|
+
type Easing = 'linear' | 'cubicOut' | 'cubicInOut' | 'quadraticOut' | 'elasticOut' | 'backOut' | 'exponentialOut' | (string & {});
|
|
19
|
+
export interface ChartOption {
|
|
20
|
+
title?: OneOrMany<TitleOption>;
|
|
21
|
+
legend?: OneOrMany<LegendOption>;
|
|
22
|
+
grid?: OneOrMany<GridOption>;
|
|
23
|
+
xAxis?: OneOrMany<XAXisOption>;
|
|
24
|
+
yAxis?: OneOrMany<YAXisOption>;
|
|
25
|
+
polar?: OneOrMany<PolarOption>;
|
|
26
|
+
angleAxis?: OneOrMany<AngleAxisOption>;
|
|
27
|
+
radiusAxis?: OneOrMany<RadiusAxisOption>;
|
|
28
|
+
radar?: OneOrMany<RadarOption>;
|
|
29
|
+
calendar?: OneOrMany<CalendarOption>;
|
|
30
|
+
tooltip?: OneOrMany<TooltipOption>;
|
|
31
|
+
visualMap?: OneOrMany<VisualMapOption>;
|
|
32
|
+
dataset?: OneOrMany<DatasetOption>;
|
|
33
|
+
aria?: AriaOption;
|
|
34
|
+
series?: OneOrMany<SeriesOption>;
|
|
35
|
+
/** Paleta das séries. */
|
|
36
|
+
color?: ColorValue[];
|
|
37
|
+
backgroundColor?: ColorValue;
|
|
38
|
+
textStyle?: TextStyleOption;
|
|
39
|
+
animation?: boolean | 'auto';
|
|
40
|
+
animationThreshold?: number;
|
|
41
|
+
animationDuration?: number | ((index: number) => number);
|
|
42
|
+
animationEasing?: Easing;
|
|
43
|
+
animationDelay?: number | ((index: number) => number);
|
|
44
|
+
animationDurationUpdate?: number | ((index: number) => number);
|
|
45
|
+
animationEasingUpdate?: Easing;
|
|
46
|
+
animationDelayUpdate?: number | ((index: number) => number);
|
|
47
|
+
stateAnimation?: {
|
|
48
|
+
duration?: number;
|
|
49
|
+
easing?: Easing;
|
|
50
|
+
};
|
|
51
|
+
useUTC?: boolean;
|
|
52
|
+
darkMode?: boolean | 'auto';
|
|
53
|
+
/** Aceitos e ignorados (componentes que o motor não desenha). */
|
|
54
|
+
toolbox?: Record<string, unknown>;
|
|
55
|
+
dataZoom?: OneOrMany<Record<string, unknown>>;
|
|
56
|
+
axisPointer?: Record<string, unknown>;
|
|
57
|
+
graphic?: unknown;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option.js","sourceRoot":"","sources":["../../src/engine/option.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentType, CoordinateSystemName, CoordinateSystemType, SeriesType } from './contract';
|
|
2
|
+
export declare const SERIES_TYPES: Map<string, SeriesType>;
|
|
3
|
+
export declare const COORDINATE_TYPES: Map<CoordinateSystemName, CoordinateSystemType>;
|
|
4
|
+
export declare const COMPONENT_TYPES: Map<string, ComponentType>;
|
|
5
|
+
export declare function registerSeriesType(type: SeriesType): void;
|
|
6
|
+
export declare function registerCoordinateSystem(type: CoordinateSystemType): void;
|
|
7
|
+
export declare function registerComponent(type: ComponentType): void;
|
|
8
|
+
/** Compatibilidade com `use([...])`: as peças já vêm registradas. */
|
|
9
|
+
export declare function use(_extensions?: unknown): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { barSeries } from './series/bar';
|
|
2
|
+
import { lineSeries } from './series/line';
|
|
3
|
+
import { scatterSeries } from './series/scatter';
|
|
4
|
+
import { boxplotSeries } from './series/boxplot';
|
|
5
|
+
import { pieSeries } from './series/pie';
|
|
6
|
+
import { funnelSeries } from './series/funnel';
|
|
7
|
+
import { gaugeSeries } from './series/gauge';
|
|
8
|
+
import { radarSeries } from './series/radar';
|
|
9
|
+
import { heatmapSeries } from './series/heatmap';
|
|
10
|
+
import { treemapSeries } from './series/treemap';
|
|
11
|
+
import { sankeySeries } from './series/sankey';
|
|
12
|
+
import { cartesianCoordinate } from './coord/cartesian';
|
|
13
|
+
import { polarCoordinate } from './coord/polar';
|
|
14
|
+
import { radarCoordinate } from './coord/radar';
|
|
15
|
+
import { calendarCoordinate } from './coord/calendar';
|
|
16
|
+
import { titleComponent } from './component/title';
|
|
17
|
+
import { legendComponent } from './component/legend';
|
|
18
|
+
import { visualMapComponent } from './component/visual-map';
|
|
19
|
+
export const SERIES_TYPES = new Map();
|
|
20
|
+
export const COORDINATE_TYPES = new Map();
|
|
21
|
+
export const COMPONENT_TYPES = new Map();
|
|
22
|
+
export function registerSeriesType(type) {
|
|
23
|
+
SERIES_TYPES.set(type.type, type);
|
|
24
|
+
}
|
|
25
|
+
export function registerCoordinateSystem(type) {
|
|
26
|
+
COORDINATE_TYPES.set(type.type, type);
|
|
27
|
+
}
|
|
28
|
+
export function registerComponent(type) {
|
|
29
|
+
COMPONENT_TYPES.set(type.key, type);
|
|
30
|
+
}
|
|
31
|
+
for (const s of [barSeries, lineSeries, scatterSeries, boxplotSeries, pieSeries, funnelSeries, gaugeSeries, radarSeries, heatmapSeries, treemapSeries, sankeySeries]) {
|
|
32
|
+
registerSeriesType(s);
|
|
33
|
+
}
|
|
34
|
+
for (const c of [cartesianCoordinate, polarCoordinate, radarCoordinate, calendarCoordinate])
|
|
35
|
+
registerCoordinateSystem(c);
|
|
36
|
+
for (const c of [titleComponent, legendComponent, visualMapComponent])
|
|
37
|
+
registerComponent(c);
|
|
38
|
+
/** Compatibilidade com `use([...])`: as peças já vêm registradas. */
|
|
39
|
+
export function use(_extensions) {
|
|
40
|
+
// nada a fazer
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/engine/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAsB,CAAC;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA8C,CAAC;AACtF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,EAAyB,CAAC;AAEhE,MAAM,UAAU,kBAAkB,CAAC,IAAgB;IACjD,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,IAA0B;IACjE,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAmB;IACnD,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,KAAK,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,CAAC,EAAE,CAAC;IACrK,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC;AACD,KAAK,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,CAAC;IAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACzH,KAAK,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,EAAE,kBAAkB,CAAC;IAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAE5F,qEAAqE;AACrE,MAAM,UAAU,GAAG,CAAC,WAAqB;IACvC,eAAe;AACjB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Point, Shape, SymbolName } from '../contract';
|
|
2
|
+
/** Ajuste de meio pixel para linhas finas ímpares (bordas nítidas). */
|
|
3
|
+
export declare function snap(value: number, lineWidth: number): number;
|
|
4
|
+
export declare function shapeToPath(shape: Shape, lineWidth?: number): string;
|
|
5
|
+
export declare function rectPath(x: number, y: number, width: number, height: number, radius?: number | number[], lineWidth?: number): string;
|
|
6
|
+
export declare function circlePath(cx: number, cy: number, r: number): string;
|
|
7
|
+
/** Arco aberto. Volta completa vira dois meios arcos (o SVG não desenha um arco de 360° só). */
|
|
8
|
+
export declare function arcPath(cx: number, cy: number, r: number, start: number, end: number, clockwise?: boolean): string;
|
|
9
|
+
/**
|
|
10
|
+
* Setor (fatia de pizza, rosca com `r0`, barra polar), com cantos arredondados opcionais: o canto é um círculo de
|
|
11
|
+
* raio `cornerRadius` tangente ao arco e à aresta radial.
|
|
12
|
+
*/
|
|
13
|
+
export declare function sectorPath(cx: number, cy: number, r0: number, r: number, start: number, end: number, clockwise?: boolean, cornerRadius?: number): string;
|
|
14
|
+
/**
|
|
15
|
+
* Polilinha, reta ou suavizada. `smooth` de 0 a 1 é a tensão (Catmull-Rom → Bézier cúbica); `smoothMonotone`
|
|
16
|
+
* mantém a curva monotônica no eixo dado (sem passar dos pontos, bom para séries temporais).
|
|
17
|
+
*/
|
|
18
|
+
export declare function polylinePath(points: Point[], smooth?: number, closed?: boolean, monotone?: 'x' | 'y'): string;
|
|
19
|
+
/**
|
|
20
|
+
* Símbolo centrado em (x, y) na caixa width × height: os do formato (`circle`, `emptyCircle`, `rect`, `roundRect`,
|
|
21
|
+
* `triangle`, `diamond`, `pin`, `arrow`, `none`), `path://d` (ajustado à caixa) e `image://` (sem desenho: o motor
|
|
22
|
+
* não carrega imagens externas).
|
|
23
|
+
*/
|
|
24
|
+
export declare function symbolPath(symbol: SymbolName, x: number, y: number, width: number, height: number): string;
|
|
25
|
+
/** Interpola duas formas do mesmo tipo (números e listas de pontos de mesmo tamanho); senão, devolve o destino. */
|
|
26
|
+
export declare function interpolateShape(from: Shape, to: Shape, t: number): Shape;
|