@antv/g2 5.1.3 → 5.1.5-beta.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/dist/g2-lite.min.js +1 -1
- package/dist/g2.min.js +1 -1
- package/esm/api/chart.d.ts +1 -0
- package/esm/api/library.d.ts +1 -0
- package/esm/api/runtime.js +3 -2
- package/esm/api/runtime.js.map +1 -1
- package/esm/api/utils.d.ts +2 -0
- package/esm/api/utils.js +31 -8
- package/esm/api/utils.js.map +1 -1
- package/esm/composition/repeatMatrix.js +4 -1
- package/esm/composition/repeatMatrix.js.map +1 -1
- package/esm/interaction/fisheye.js +3 -1
- package/esm/interaction/fisheye.js.map +1 -1
- package/esm/interaction/legendFilter.d.ts +1 -1
- package/esm/interaction/legendFilter.js +72 -31
- package/esm/interaction/legendFilter.js.map +1 -1
- package/esm/interaction/tooltip.d.ts +2 -2
- package/esm/interaction/tooltip.js +82 -40
- package/esm/interaction/tooltip.js.map +1 -1
- package/esm/lib/core.d.ts +1 -0
- package/esm/lib/core.js +2 -1
- package/esm/lib/core.js.map +1 -1
- package/esm/lib/std.d.ts +1 -0
- package/esm/lib/threed.d.ts +1 -0
- package/esm/lib/threed.js +2 -1
- package/esm/lib/threed.js.map +1 -1
- package/esm/mark/index.d.ts +1 -0
- package/esm/mark/index.js +1 -0
- package/esm/mark/index.js.map +1 -1
- package/esm/mark/interval3D.d.ts +8 -0
- package/esm/mark/interval3D.js +65 -0
- package/esm/mark/interval3D.js.map +1 -0
- package/esm/runtime/plot.js +11 -4
- package/esm/runtime/plot.js.map +1 -1
- package/esm/shape/connector/connector.js +1 -1
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/index.d.ts +2 -1
- package/esm/shape/index.js +1 -0
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval3D/cube.d.ts +6 -0
- package/esm/shape/interval3D/cube.js +71 -0
- package/esm/shape/interval3D/cube.js.map +1 -0
- package/esm/spec/interaction.d.ts +1 -0
- package/esm/theme/academy.js +30 -358
- package/esm/theme/academy.js.map +1 -1
- package/esm/theme/classic.js +4 -433
- package/esm/theme/classic.js.map +1 -1
- package/esm/theme/classicDark.js +3 -404
- package/esm/theme/classicDark.js.map +1 -1
- package/esm/theme/create.d.ts +437 -0
- package/esm/theme/create.js +421 -0
- package/esm/theme/create.js.map +1 -0
- package/esm/theme/dark.d.ts +3 -0
- package/esm/theme/dark.js +76 -0
- package/esm/theme/dark.js.map +1 -0
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.js +52 -470
- package/esm/theme/light.js.map +1 -1
- package/lib/api/chart.d.ts +1 -0
- package/lib/api/library.d.ts +1 -0
- package/lib/api/runtime.js +2 -1
- package/lib/api/runtime.js.map +1 -1
- package/lib/api/utils.d.ts +2 -0
- package/lib/api/utils.js +32 -9
- package/lib/api/utils.js.map +1 -1
- package/lib/composition/repeatMatrix.js +4 -1
- package/lib/composition/repeatMatrix.js.map +1 -1
- package/lib/interaction/fisheye.js +3 -1
- package/lib/interaction/fisheye.js.map +1 -1
- package/lib/interaction/legendFilter.d.ts +1 -1
- package/lib/interaction/legendFilter.js +72 -31
- package/lib/interaction/legendFilter.js.map +1 -1
- package/lib/interaction/tooltip.d.ts +2 -2
- package/lib/interaction/tooltip.js +82 -40
- package/lib/interaction/tooltip.js.map +1 -1
- package/lib/lib/core.d.ts +1 -0
- package/lib/lib/core.js +1 -0
- package/lib/lib/core.js.map +1 -1
- package/lib/lib/std.d.ts +1 -0
- package/lib/lib/threed.d.ts +1 -0
- package/lib/lib/threed.js +1 -0
- package/lib/lib/threed.js.map +1 -1
- package/lib/mark/index.d.ts +1 -0
- package/lib/mark/index.js +3 -1
- package/lib/mark/index.js.map +1 -1
- package/lib/mark/interval3D.d.ts +8 -0
- package/lib/mark/interval3D.js +69 -0
- package/lib/mark/interval3D.js.map +1 -0
- package/lib/runtime/plot.js +11 -4
- package/lib/runtime/plot.js.map +1 -1
- package/lib/shape/connector/connector.js +1 -1
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/index.d.ts +2 -1
- package/lib/shape/index.js +4 -2
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval3D/cube.d.ts +6 -0
- package/lib/shape/interval3D/cube.js +75 -0
- package/lib/shape/interval3D/cube.js.map +1 -0
- package/lib/spec/interaction.d.ts +1 -0
- package/lib/theme/academy.js +30 -358
- package/lib/theme/academy.js.map +1 -1
- package/lib/theme/classic.js +4 -433
- package/lib/theme/classic.js.map +1 -1
- package/lib/theme/classicDark.js +3 -404
- package/lib/theme/classicDark.js.map +1 -1
- package/lib/theme/create.d.ts +437 -0
- package/lib/theme/create.js +425 -0
- package/lib/theme/create.js.map +1 -0
- package/lib/theme/dark.d.ts +3 -0
- package/lib/theme/dark.js +80 -0
- package/lib/theme/dark.js.map +1 -0
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.js +52 -470
- package/lib/theme/light.js.map +1 -1
- package/package.json +1 -1
- package/src/api/runtime.ts +2 -1
- package/src/api/utils.ts +29 -7
- package/src/composition/repeatMatrix.ts +11 -2
- package/src/interaction/fisheye.ts +3 -1
- package/src/interaction/legendFilter.ts +81 -48
- package/src/interaction/tooltip.ts +105 -49
- package/src/lib/core.ts +2 -1
- package/src/lib/threed.ts +2 -1
- package/src/mark/index.ts +1 -0
- package/src/mark/interval3D.ts +100 -0
- package/src/runtime/plot.ts +34 -7
- package/src/shape/connector/connector.ts +1 -1
- package/src/shape/index.ts +2 -1
- package/src/shape/interval3D/cube.ts +69 -0
- package/src/spec/interaction.ts +1 -0
- package/src/theme/academy.ts +74 -399
- package/src/theme/classic.ts +11 -438
- package/src/theme/classicDark.ts +10 -409
- package/src/theme/create.ts +439 -0
- package/src/theme/dark.ts +85 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +53 -473
- package/CHANGELOG.md +0 -385
package/src/runtime/plot.ts
CHANGED
|
@@ -278,7 +278,12 @@ export async function plot<T extends G2ViewTree>(
|
|
|
278
278
|
for (const typeOption of inferInteraction(options)) {
|
|
279
279
|
const [type, option] = typeOption;
|
|
280
280
|
if (option) {
|
|
281
|
-
const interaction =
|
|
281
|
+
const interaction = useThemeInteraction(
|
|
282
|
+
target.view,
|
|
283
|
+
type,
|
|
284
|
+
option as Record<string, any>,
|
|
285
|
+
useInteraction,
|
|
286
|
+
);
|
|
282
287
|
const destroy = interaction(
|
|
283
288
|
target,
|
|
284
289
|
enterViewInstances,
|
|
@@ -303,7 +308,12 @@ export async function plot<T extends G2ViewTree>(
|
|
|
303
308
|
|
|
304
309
|
// Apply new interaction.
|
|
305
310
|
if (option) {
|
|
306
|
-
const interaction =
|
|
311
|
+
const interaction = useThemeInteraction(
|
|
312
|
+
target.view,
|
|
313
|
+
type,
|
|
314
|
+
option as Record<string, any>,
|
|
315
|
+
useInteraction,
|
|
316
|
+
);
|
|
307
317
|
const destroy = interaction(
|
|
308
318
|
target,
|
|
309
319
|
updateViewInstances,
|
|
@@ -402,17 +412,20 @@ function updateTooltip(
|
|
|
402
412
|
if (!tooltipOptions[1]) return;
|
|
403
413
|
|
|
404
414
|
// Apply new tooltip interaction.
|
|
405
|
-
const applyTooltip =
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
415
|
+
const applyTooltip = useThemeInteraction(
|
|
416
|
+
view,
|
|
417
|
+
'tooltip',
|
|
418
|
+
tooltipOptions[1] as any,
|
|
419
|
+
useInteraction,
|
|
420
|
+
);
|
|
409
421
|
const target = {
|
|
410
422
|
options,
|
|
411
423
|
view,
|
|
412
424
|
container: selection.node(),
|
|
413
425
|
update: (options) => Promise.resolve(options),
|
|
414
426
|
};
|
|
415
|
-
applyTooltip(target, [], context.emitter);
|
|
427
|
+
const newTooltip = applyTooltip(target, [], context.emitter);
|
|
428
|
+
nameInteraction.set('tooltip', newTooltip);
|
|
416
429
|
}
|
|
417
430
|
|
|
418
431
|
async function initializeView(
|
|
@@ -593,6 +606,20 @@ async function initializeMarks(
|
|
|
593
606
|
return markState;
|
|
594
607
|
}
|
|
595
608
|
|
|
609
|
+
function useThemeInteraction(
|
|
610
|
+
view: G2ViewDescriptor,
|
|
611
|
+
type: string,
|
|
612
|
+
option: Record<string, any>,
|
|
613
|
+
useInteraction: (options: G2InteractionOptions, context?: any) => Interaction,
|
|
614
|
+
): Interaction {
|
|
615
|
+
const theme = view.theme;
|
|
616
|
+
const defaults = typeof type === 'string' ? theme[type] || {} : {};
|
|
617
|
+
const interaction = useInteraction(
|
|
618
|
+
deepMix(defaults, { type, ...(option as any) }),
|
|
619
|
+
);
|
|
620
|
+
return interaction;
|
|
621
|
+
}
|
|
622
|
+
|
|
596
623
|
function initializeState(
|
|
597
624
|
markState: Map<G2Mark, G2MarkState>,
|
|
598
625
|
options: G2View,
|
package/src/shape/index.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { Triangle as PointTriangle } from './point/triangle';
|
|
|
32
32
|
export { TriangleDown as PointTriangleDown } from './point/triangleDown';
|
|
33
33
|
export { Sphere } from './point3D/sphere';
|
|
34
34
|
export { Cube } from './point3D/cube';
|
|
35
|
+
export { Cube as IntervalCube } from './interval3D/cube';
|
|
35
36
|
export { Vector as VectorShape } from './vector/vector';
|
|
36
37
|
export { Text as TextShape } from './text/text';
|
|
37
38
|
export { Badge as TextBadge } from './text/badge';
|
|
@@ -65,7 +66,7 @@ export { Liquid as LiquidShape } from './liquid/liquid';
|
|
|
65
66
|
export type { RectOptions as IntervalShapeOptions } from './interval/rect';
|
|
66
67
|
export type { HollowOptions as IntervalHollowOptions } from './interval/hollow';
|
|
67
68
|
export type { FunnelOptions as IntervalFunnelOptions } from './interval/funnel';
|
|
68
|
-
export type { PyramidOptions as
|
|
69
|
+
export type { PyramidOptions as IntervalPyline3DramidOptions } from './interval/pyramid';
|
|
69
70
|
export type { LineOptions as LineShapeOptions } from './line/line';
|
|
70
71
|
export type { SmoothOptions as LineSmoothOptions } from './line/smooth';
|
|
71
72
|
export type { HVOptions as LineHVOptions } from './line/hv';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { MeshLambertMaterial, CubeGeometry, Mesh } from '@antv/g-plugin-3d';
|
|
2
|
+
import { applyStyle, getOrigin, toOpacityKey } from '../utils';
|
|
3
|
+
import { ShapeComponent as SC, Vector3 } from '../../runtime';
|
|
4
|
+
import { select } from '../../utils/selection';
|
|
5
|
+
|
|
6
|
+
export type CubeOptions = Record<string, any>;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @see https://g.antv.antgroup.com/api/3d/geometry#cubegeometry
|
|
10
|
+
*/
|
|
11
|
+
export const Cube: SC<CubeOptions> = (options, context) => {
|
|
12
|
+
// Render border only when colorAttribute is stroke.
|
|
13
|
+
const { ...style } = options;
|
|
14
|
+
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
if (!context.cubeGeometry) {
|
|
17
|
+
const renderer = context.canvas.getConfig().renderer;
|
|
18
|
+
const plugin = renderer.getPlugin('device-renderer');
|
|
19
|
+
const device = plugin.getDevice();
|
|
20
|
+
// create a cube geometry
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
context.cubeGeometry = new CubeGeometry(device, {
|
|
23
|
+
width: 1,
|
|
24
|
+
height: 1,
|
|
25
|
+
depth: 1,
|
|
26
|
+
});
|
|
27
|
+
// create a material with Lambert lighting model
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
context.cubeMaterial = new MeshLambertMaterial(device);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (_points, value, defaults) => {
|
|
33
|
+
const points = _points as unknown as Vector3[];
|
|
34
|
+
const { color: defaultColor } = defaults;
|
|
35
|
+
const { color = defaultColor, transform, opacity } = value;
|
|
36
|
+
const [cx, cy, cz] = getOrigin(points);
|
|
37
|
+
|
|
38
|
+
const width = Math.abs(points[1][0] - points[0][0]);
|
|
39
|
+
const height = Math.abs(points[1][1] - points[0][1]);
|
|
40
|
+
const depth = Math.abs(points[1][2] - points[0][2]);
|
|
41
|
+
|
|
42
|
+
const cube = new Mesh({
|
|
43
|
+
style: {
|
|
44
|
+
x: cx,
|
|
45
|
+
y: cy,
|
|
46
|
+
z: cz,
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
geometry: context.cubeGeometry,
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
material: context.cubeMaterial,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
cube.setOrigin(0, 0, 0);
|
|
54
|
+
cube.scale([width, height, depth]);
|
|
55
|
+
|
|
56
|
+
const selection = select(cube)
|
|
57
|
+
.call(applyStyle, defaults)
|
|
58
|
+
.style('fill', color)
|
|
59
|
+
.style('transform', transform)
|
|
60
|
+
.style(toOpacityKey(options), opacity)
|
|
61
|
+
.call(applyStyle, style)
|
|
62
|
+
.node();
|
|
63
|
+
return selection;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
Cube.props = {
|
|
68
|
+
defaultMarker: 'cube',
|
|
69
|
+
};
|
package/src/spec/interaction.ts
CHANGED
|
@@ -180,6 +180,7 @@ export type TooltipInteraction = {
|
|
|
180
180
|
position?: TooltipStyleProps['position'];
|
|
181
181
|
bounding?: BBox;
|
|
182
182
|
mount?: string | HTMLElement;
|
|
183
|
+
css?: Record<string, any>; // @todo
|
|
183
184
|
// enterable?: boolean;
|
|
184
185
|
sort?: (d: TooltipItemValue) => any;
|
|
185
186
|
filter?: (d: TooltipItemValue) => any;
|
package/src/theme/academy.ts
CHANGED
|
@@ -1,414 +1,89 @@
|
|
|
1
|
+
import { deepMix } from '@antv/util';
|
|
1
2
|
import { ThemeComponent as TC, Theme } from '../runtime';
|
|
3
|
+
import { create } from './create';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
const defaults = create({
|
|
6
|
+
colorBlack: '#000',
|
|
7
|
+
colorWhite: '#fff',
|
|
8
|
+
colorStroke: '#888',
|
|
9
|
+
colorDefault: '#4e79a7',
|
|
10
|
+
colorBackground: 'transparent',
|
|
11
|
+
category10: 'tableau10',
|
|
12
|
+
category20: 'tableau10',
|
|
13
|
+
padding1: 8,
|
|
14
|
+
padding2: 12,
|
|
15
|
+
padding3: 20,
|
|
16
|
+
alpha90: 0.9,
|
|
17
|
+
alpha65: 0.65,
|
|
18
|
+
alpha45: 0.45,
|
|
19
|
+
alpha25: 0.25,
|
|
20
|
+
alpha10: 0.1,
|
|
21
|
+
});
|
|
12
22
|
|
|
13
|
-
|
|
23
|
+
export type AcademyOptions = Theme;
|
|
14
24
|
|
|
15
25
|
export const Academy: TC<AcademyOptions> = (options) => {
|
|
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
|
-
r: 3,
|
|
63
|
-
strokeOpacity: 0.95,
|
|
64
|
-
lineWidth: 3,
|
|
65
|
-
},
|
|
66
|
-
diamond: {
|
|
67
|
-
r: 3,
|
|
68
|
-
strokeOpacity: 0.95,
|
|
69
|
-
lineWidth: 1,
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
interval: {
|
|
73
|
-
rect: {
|
|
74
|
-
fillOpacity: 0.95,
|
|
75
|
-
},
|
|
76
|
-
hollow: {
|
|
77
|
-
fill: '',
|
|
78
|
-
strokeOpacity: 1,
|
|
79
|
-
lineWidth: 2,
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
area: {
|
|
83
|
-
area: {
|
|
84
|
-
fillOpacity: 0.85,
|
|
85
|
-
lineWidth: 0,
|
|
86
|
-
connectFill: COLORS.BLACK,
|
|
87
|
-
connectFillOpacity: 0.1,
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
polygon: {
|
|
91
|
-
polygon: {
|
|
92
|
-
fillOpacity: 0.95,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
cell: {
|
|
96
|
-
cell: {
|
|
97
|
-
fillOpacity: 0.95,
|
|
98
|
-
},
|
|
99
|
-
hollow: {
|
|
100
|
-
fill: '',
|
|
101
|
-
strokeOpacity: 1,
|
|
102
|
-
lineWidth: 2,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
rect: {
|
|
106
|
-
rect: {
|
|
107
|
-
fillOpacity: 0.95,
|
|
108
|
-
},
|
|
109
|
-
hollow: {
|
|
110
|
-
fill: '',
|
|
111
|
-
strokeOpacity: 1,
|
|
112
|
-
lineWidth: 2,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
link: {
|
|
116
|
-
link: {
|
|
117
|
-
fill: '',
|
|
118
|
-
strokeOpacity: 1,
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
vector: {
|
|
122
|
-
vector: {
|
|
123
|
-
fillOpacity: 1,
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
box: {
|
|
127
|
-
box: {
|
|
128
|
-
fillOpacity: 0.95,
|
|
129
|
-
stroke: '#1D2129',
|
|
130
|
-
lineWidth: 1,
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
text: {
|
|
134
|
-
text: {
|
|
135
|
-
fill: '#1D2129',
|
|
26
|
+
return deepMix(
|
|
27
|
+
{},
|
|
28
|
+
defaults,
|
|
29
|
+
{
|
|
30
|
+
text: { text: { fontSize: 10 } },
|
|
31
|
+
axis: {
|
|
32
|
+
gridLineDash: [0, 0],
|
|
33
|
+
gridLineWidth: 1,
|
|
34
|
+
gridStroke: '#ddd',
|
|
35
|
+
gridStrokeOpacity: 1,
|
|
36
|
+
labelOpacity: 1,
|
|
37
|
+
labelStrokeOpacity: 1,
|
|
38
|
+
labelFontSize: 10,
|
|
39
|
+
line: true,
|
|
40
|
+
lineLineWidth: 1,
|
|
41
|
+
lineStroke: '#888',
|
|
42
|
+
lineStrokeOpacity: 1,
|
|
43
|
+
tickLength: 5,
|
|
44
|
+
tickStrokeOpacity: 1,
|
|
45
|
+
titleOpacity: 1,
|
|
46
|
+
titleStrokeOpacity: 1,
|
|
47
|
+
titleFillOpacity: 1,
|
|
48
|
+
titleFontSize: 11,
|
|
49
|
+
titleFontWeight: 'bold',
|
|
50
|
+
},
|
|
51
|
+
axisLeft: {
|
|
52
|
+
gridFilter: (_, i) => i !== 0,
|
|
53
|
+
},
|
|
54
|
+
axisRight: {
|
|
55
|
+
gridFilter: (_, i) => i !== 0,
|
|
56
|
+
},
|
|
57
|
+
legendCategory: {
|
|
58
|
+
itemLabelFillOpacity: 1,
|
|
59
|
+
itemLabelFontSize: 10,
|
|
60
|
+
itemValueFillOpacity: 1,
|
|
61
|
+
itemValueFontSize: 10,
|
|
62
|
+
titleFillOpacity: 1,
|
|
63
|
+
titleFontSize: 11,
|
|
64
|
+
titleFontWeight: 'bold',
|
|
65
|
+
},
|
|
66
|
+
legendContinuous: {
|
|
67
|
+
handleLabelFontSize: 10,
|
|
68
|
+
labelFillOpacity: 0.45,
|
|
69
|
+
labelFontSize: 10,
|
|
70
|
+
},
|
|
71
|
+
label: {
|
|
136
72
|
fontSize: 10,
|
|
137
|
-
strokeWidth: 0,
|
|
138
|
-
connectorStroke: COLORS.STROKE,
|
|
139
|
-
connectorStrokeOpacity: 0.45,
|
|
140
|
-
connectorLineWidth: 1,
|
|
141
|
-
backgroundFill: COLORS.STROKE,
|
|
142
|
-
backgroundFillOpacity: 0.15,
|
|
143
|
-
backgroundPadding: [2, 4],
|
|
144
|
-
startMarkerSymbol: 'circle',
|
|
145
|
-
startMarkerSize: 4,
|
|
146
|
-
endMarkerSymbol: 'circle',
|
|
147
|
-
endMarkerSize: 4,
|
|
148
73
|
},
|
|
149
|
-
|
|
150
|
-
fill: '#1D2129',
|
|
151
|
-
fillOpacity: 0.65,
|
|
152
|
-
strokeWidth: 0,
|
|
74
|
+
innerLabel: {
|
|
153
75
|
fontSize: 10,
|
|
154
|
-
textAlign: 'center',
|
|
155
|
-
textBaseline: 'middle',
|
|
156
|
-
markerFill: COLORS.STROKE,
|
|
157
|
-
markerFillOpacity: 0.25,
|
|
158
|
-
markerStrokeOpacity: 0,
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
lineX: {
|
|
162
|
-
line: {
|
|
163
|
-
stroke: COLORS.STROKE,
|
|
164
|
-
strokeOpacity: 0.45,
|
|
165
|
-
lineWidth: 1,
|
|
166
76
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
line: {
|
|
170
|
-
stroke: COLORS.STROKE,
|
|
171
|
-
strokeOpacity: 0.45,
|
|
172
|
-
lineWidth: 1,
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
rangeX: {
|
|
176
|
-
range: {
|
|
177
|
-
fill: COLORS.STROKE,
|
|
178
|
-
fillOpacity: 0.15,
|
|
179
|
-
lineWidth: 0,
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
rangeY: {
|
|
183
|
-
range: {
|
|
184
|
-
fill: COLORS.STROKE,
|
|
185
|
-
fillOpacity: 0.15,
|
|
186
|
-
lineWidth: 0,
|
|
77
|
+
htmlLabel: {
|
|
78
|
+
fontSize: 10,
|
|
187
79
|
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
stroke: COLORS.STROKE,
|
|
192
|
-
strokeOpacity: 0.45,
|
|
193
|
-
lineWidth: 1,
|
|
194
|
-
connectLength1: 12,
|
|
195
|
-
endMarker: true,
|
|
196
|
-
endMarkerSize: 6,
|
|
197
|
-
endMarkerFill: COLORS.STROKE,
|
|
198
|
-
endMarkerFillOpacity: 0.95,
|
|
80
|
+
slider: {
|
|
81
|
+
handleLabelFontSize: 10,
|
|
82
|
+
trackFillOpacity: 0.05,
|
|
199
83
|
},
|
|
200
84
|
},
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
gridLineDash: [0, 0],
|
|
204
|
-
gridLineWidth: 1,
|
|
205
|
-
gridStroke: '#ddd',
|
|
206
|
-
gridStrokeOpacity: 1,
|
|
207
|
-
labelAlign: 'horizontal',
|
|
208
|
-
labelAutoRotate: false,
|
|
209
|
-
labelFill: COLORS.BLACK,
|
|
210
|
-
labelFillOpacity: 1,
|
|
211
|
-
labelFontSize: 10,
|
|
212
|
-
labelFontWeight: 'normal',
|
|
213
|
-
labelSpacing: 4,
|
|
214
|
-
line: true,
|
|
215
|
-
lineLineWidth: 1,
|
|
216
|
-
lineStroke: '#888',
|
|
217
|
-
lineStrokeOpacity: 1,
|
|
218
|
-
tickLength: 5,
|
|
219
|
-
tickLineWidth: 1,
|
|
220
|
-
tickStroke: COLORS.STROKE,
|
|
221
|
-
tickStrokeOpacity: 1,
|
|
222
|
-
titleFill: COLORS.BLACK,
|
|
223
|
-
titleFillOpacity: 1,
|
|
224
|
-
titleFontSize: 11,
|
|
225
|
-
titleFontWeight: 'bold',
|
|
226
|
-
titleSpacing: 12,
|
|
227
|
-
titleTransformOrigin: 'center',
|
|
228
|
-
},
|
|
229
|
-
axisTop: {
|
|
230
|
-
gridDirection: 'positive',
|
|
231
|
-
labelDirection: 'negative',
|
|
232
|
-
tickDirection: 'negative',
|
|
233
|
-
titlePosition: 'top',
|
|
234
|
-
titleSpacing: 0,
|
|
235
|
-
titleTextBaseline: 'middle',
|
|
236
|
-
labelSpacing: 4,
|
|
237
|
-
},
|
|
238
|
-
axisBottom: {
|
|
239
|
-
gridDirection: 'negative',
|
|
240
|
-
labelDirection: 'positive',
|
|
241
|
-
labelSpacing: 4,
|
|
242
|
-
tickDirection: 'positive',
|
|
243
|
-
titlePosition: 'bottom',
|
|
244
|
-
titleSpacing: 4,
|
|
245
|
-
titleTextBaseline: 'bottom',
|
|
246
|
-
},
|
|
247
|
-
axisLeft: {
|
|
248
|
-
gridDirection: 'positive',
|
|
249
|
-
labelDirection: 'negative',
|
|
250
|
-
labelSpacing: 4,
|
|
251
|
-
tickDirection: 'negative',
|
|
252
|
-
titlePosition: 'left',
|
|
253
|
-
titleSpacing: 4,
|
|
254
|
-
titleTextBaseline: 'middle',
|
|
255
|
-
titleDirection: 'vertical',
|
|
256
|
-
titleTransformOrigin: 'center',
|
|
257
|
-
},
|
|
258
|
-
axisRight: {
|
|
259
|
-
gridDirection: 'negative',
|
|
260
|
-
labelDirection: 'positive',
|
|
261
|
-
labelSpacing: 4,
|
|
262
|
-
tickDirection: 'positive',
|
|
263
|
-
titlePosition: 'right',
|
|
264
|
-
titleSpacing: 0,
|
|
265
|
-
titleTextBaseline: 'top',
|
|
266
|
-
titleDirection: 'vertical',
|
|
267
|
-
titleTransformOrigin: 'center',
|
|
268
|
-
},
|
|
269
|
-
axisLinear: {
|
|
270
|
-
girdClosed: true,
|
|
271
|
-
gridConnect: 'arc',
|
|
272
|
-
gridDirection: 'negative',
|
|
273
|
-
gridType: 'surround',
|
|
274
|
-
titlePosition: 'top',
|
|
275
|
-
titleTextBaseline: 'bottom',
|
|
276
|
-
},
|
|
277
|
-
axisArc: {
|
|
278
|
-
title: false,
|
|
279
|
-
titlePosition: 'inner',
|
|
280
|
-
line: false,
|
|
281
|
-
tick: true,
|
|
282
|
-
labelSpacing: 4,
|
|
283
|
-
},
|
|
284
|
-
axisRadar: {
|
|
285
|
-
girdClosed: true,
|
|
286
|
-
gridStrokeOpacity: 0.3,
|
|
287
|
-
gridType: 'surround',
|
|
288
|
-
label: false,
|
|
289
|
-
tick: false,
|
|
290
|
-
titlePosition: 'start',
|
|
291
|
-
},
|
|
292
|
-
legendCategory: {
|
|
293
|
-
backgroundFill: 'transparent',
|
|
294
|
-
itemBackgroundFill: 'transparent',
|
|
295
|
-
itemLabelFill: COLORS.BLACK,
|
|
296
|
-
itemLabelFillOpacity: 1,
|
|
297
|
-
itemLabelFontSize: 10,
|
|
298
|
-
itemLabelFontWeight: 'normal',
|
|
299
|
-
// legend marker
|
|
300
|
-
// itemMarkerFill: DEFAULT_COLOR,
|
|
301
|
-
itemMarkerFillOpacity: 1,
|
|
302
|
-
itemMarkerSize: 8,
|
|
303
|
-
itemSpacing: [5, 4],
|
|
304
|
-
itemValueFill: COLORS.BLACK,
|
|
305
|
-
itemValueFillOpacity: 1,
|
|
306
|
-
itemValueFontSize: 10,
|
|
307
|
-
itemValueFontWeight: 'normal',
|
|
308
|
-
// [todo] rename legend navigator
|
|
309
|
-
navButtonFill: COLORS.BLACK,
|
|
310
|
-
navButtonFillOpacity: 0.45,
|
|
311
|
-
navButtonSize: 6,
|
|
312
|
-
navPageNumFill: COLORS.BLACK,
|
|
313
|
-
navPageNumFillOpacity: 0.45,
|
|
314
|
-
navPageNumFontSize: 10,
|
|
315
|
-
padding: 8,
|
|
316
|
-
title: true,
|
|
317
|
-
titleFill: COLORS.BLACK,
|
|
318
|
-
titleFillOpacity: 1,
|
|
319
|
-
titleFontSize: 11,
|
|
320
|
-
titleFontWeight: 'bold',
|
|
321
|
-
titleSpacing: 4,
|
|
322
|
-
rowPadding: 0,
|
|
323
|
-
colPadding: 8,
|
|
324
|
-
},
|
|
325
|
-
legendContinuous: {
|
|
326
|
-
handleHeight: 12,
|
|
327
|
-
handleLabelFill: COLORS.BLACK,
|
|
328
|
-
handleLabelFillOpacity: 0.45,
|
|
329
|
-
handleLabelFontSize: 10,
|
|
330
|
-
handleLabelFontWeight: 'normal',
|
|
331
|
-
handleMarkerFill: COLORS.BLACK,
|
|
332
|
-
handleMarkerFillOpacity: 0.6,
|
|
333
|
-
handleMarkerLineWidth: 1,
|
|
334
|
-
handleMarkerStroke: COLORS.BLACK,
|
|
335
|
-
handleMarkerStrokeOpacity: 0.25,
|
|
336
|
-
handleWidth: 10,
|
|
337
|
-
labelFill: COLORS.BLACK,
|
|
338
|
-
labelFillOpacity: 0.45,
|
|
339
|
-
labelFontSize: 10,
|
|
340
|
-
labelFontWeight: 'normal',
|
|
341
|
-
title: true,
|
|
342
|
-
titleSpacing: 4,
|
|
343
|
-
ribbonFill: '#aaa',
|
|
344
|
-
handle: true,
|
|
345
|
-
handleLabel: false,
|
|
346
|
-
handleShape: 'slider',
|
|
347
|
-
handleIconSize: 12 / 1.8,
|
|
348
|
-
indicator: false,
|
|
349
|
-
titleFontWeight: 'bold',
|
|
350
|
-
},
|
|
351
|
-
label: {
|
|
352
|
-
fill: COLORS.BLACK,
|
|
353
|
-
fillOpacity: 0.65,
|
|
354
|
-
fontSize: 10,
|
|
355
|
-
fontWeight: 'normal',
|
|
356
|
-
stroke: undefined,
|
|
357
|
-
offset: 12,
|
|
358
|
-
connectorStroke: COLORS.BLACK,
|
|
359
|
-
connectorStrokeOpacity: 0.45,
|
|
360
|
-
connectorLineWidth: 1,
|
|
361
|
-
connectorLength: 12,
|
|
362
|
-
connectorLength2: 8,
|
|
363
|
-
connectorDistance: 4,
|
|
364
|
-
},
|
|
365
|
-
innerLabel: {
|
|
366
|
-
fill: COLORS.WHITE,
|
|
367
|
-
fontSize: 10,
|
|
368
|
-
fillOpacity: 0.85,
|
|
369
|
-
fontWeight: 'normal',
|
|
370
|
-
stroke: undefined,
|
|
371
|
-
offset: 0,
|
|
372
|
-
},
|
|
373
|
-
htmlLabel: {
|
|
374
|
-
fontSize: 12,
|
|
375
|
-
opacity: 0.65,
|
|
376
|
-
color: COLORS.BLACK,
|
|
377
|
-
fontWeight: 'normal',
|
|
378
|
-
},
|
|
379
|
-
slider: {
|
|
380
|
-
trackSize: 16,
|
|
381
|
-
trackFill: COLORS.STROKE,
|
|
382
|
-
trackFillOpacity: 0.05,
|
|
383
|
-
selectionFill: DEFAULT_COLOR,
|
|
384
|
-
selectionFillOpacity: 0.15,
|
|
385
|
-
handleIconSize: 10,
|
|
386
|
-
handleIconFill: '#f7f7f7',
|
|
387
|
-
handleIconFillOpacity: 1,
|
|
388
|
-
handleIconStroke: COLORS.BLACK,
|
|
389
|
-
handleIconStrokeOpacity: 0.25,
|
|
390
|
-
handleIconLineWidth: 1,
|
|
391
|
-
handleIconRadius: 2,
|
|
392
|
-
handleLabelFill: COLORS.BLACK,
|
|
393
|
-
handleLabelFillOpacity: 0.45,
|
|
394
|
-
handleLabelFontSize: 10,
|
|
395
|
-
handleLabelFontWeight: 'normal',
|
|
396
|
-
},
|
|
397
|
-
scrollbar: {},
|
|
398
|
-
title: {
|
|
399
|
-
titleFill: COLORS.BLACK,
|
|
400
|
-
titleFillOpacity: 0.85,
|
|
401
|
-
titleFontSize: 14,
|
|
402
|
-
titleFontWeight: 'bold',
|
|
403
|
-
titleTextBaseline: 'top',
|
|
404
|
-
subtitleFill: COLORS.BLACK,
|
|
405
|
-
subtitleFillOpacity: 0.65,
|
|
406
|
-
subtitleFontSize: 12,
|
|
407
|
-
subtitleFontWeight: 'normal',
|
|
408
|
-
subtitleTextBaseline: 'top',
|
|
409
|
-
},
|
|
410
|
-
};
|
|
411
|
-
return Object.assign({}, defaultOptions, options);
|
|
85
|
+
options,
|
|
86
|
+
);
|
|
412
87
|
};
|
|
413
88
|
|
|
414
89
|
Academy.props = {};
|