@antv/g2 5.0.22 → 5.0.24

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.
Files changed (236) hide show
  1. package/CHANGELOG.md +325 -0
  2. package/dist/g2-lite.min.js +3 -3
  3. package/dist/g2.min.js +3 -3
  4. package/esm/api/chart.d.ts +9 -17
  5. package/esm/api/chart.js.map +1 -1
  6. package/esm/api/extend.d.ts +5 -1
  7. package/esm/api/extend.js.map +1 -1
  8. package/esm/api/index.d.ts +1 -1
  9. package/esm/api/index.js.map +1 -1
  10. package/esm/api/library.d.ts +6 -16
  11. package/esm/api/runtime.js +4 -1
  12. package/esm/api/runtime.js.map +1 -1
  13. package/esm/component/axis.js +15 -10
  14. package/esm/component/axis.js.map +1 -1
  15. package/esm/component/legendCategory.js +2 -2
  16. package/esm/component/legendCategory.js.map +1 -1
  17. package/esm/component/legendContinuous.js +4 -5
  18. package/esm/component/legendContinuous.js.map +1 -1
  19. package/esm/component/scrollbar.js +2 -0
  20. package/esm/component/scrollbar.js.map +1 -1
  21. package/esm/component/slider.js +2 -0
  22. package/esm/component/slider.js.map +1 -1
  23. package/esm/component/title.js +4 -2
  24. package/esm/component/title.js.map +1 -1
  25. package/esm/component/utils.d.ts +1 -1
  26. package/esm/component/utils.js +2 -3
  27. package/esm/component/utils.js.map +1 -1
  28. package/esm/composition/facetRect.js +2 -2
  29. package/esm/composition/facetRect.js.map +1 -1
  30. package/esm/composition/repeatMatrix.js +3 -3
  31. package/esm/composition/repeatMatrix.js.map +1 -1
  32. package/esm/index.d.ts +2 -2
  33. package/esm/index.js +1 -1
  34. package/esm/index.js.map +1 -1
  35. package/esm/interaction/brushHighlight.js.map +1 -1
  36. package/esm/interaction/tooltip.js +4 -3
  37. package/esm/interaction/tooltip.js.map +1 -1
  38. package/esm/lib/builtinlib.d.ts +13 -0
  39. package/esm/lib/builtinlib.js +21 -0
  40. package/esm/lib/builtinlib.js.map +1 -0
  41. package/esm/lib/core.d.ts +2 -12
  42. package/esm/lib/core.js +8 -19
  43. package/esm/lib/core.js.map +1 -1
  44. package/esm/lib/graph.d.ts +5 -0
  45. package/esm/lib/graph.js +7 -1
  46. package/esm/lib/graph.js.map +1 -1
  47. package/esm/lib/plot.d.ts +0 -5
  48. package/esm/lib/plot.js +2 -7
  49. package/esm/lib/plot.js.map +1 -1
  50. package/esm/lib/std.d.ts +6 -16
  51. package/esm/lib/threed.d.ts +1 -0
  52. package/esm/lib/threed.js +2 -1
  53. package/esm/lib/threed.js.map +1 -1
  54. package/esm/mark/index.d.ts +1 -0
  55. package/esm/mark/index.js +1 -0
  56. package/esm/mark/index.js.map +1 -1
  57. package/esm/mark/line3D.d.ts +7 -0
  58. package/esm/mark/line3D.js +65 -0
  59. package/esm/mark/line3D.js.map +1 -0
  60. package/esm/runtime/component.js +33 -30
  61. package/esm/runtime/component.js.map +1 -1
  62. package/esm/runtime/layout.js +79 -28
  63. package/esm/runtime/layout.js.map +1 -1
  64. package/esm/runtime/library.d.ts +1 -1
  65. package/esm/runtime/library.js +3 -1
  66. package/esm/runtime/library.js.map +1 -1
  67. package/esm/runtime/plot.js +42 -42
  68. package/esm/runtime/plot.js.map +1 -1
  69. package/esm/runtime/render.js +1 -4
  70. package/esm/runtime/render.js.map +1 -1
  71. package/esm/runtime/scale.js +2 -0
  72. package/esm/runtime/scale.js.map +1 -1
  73. package/esm/runtime/types/common.d.ts +3 -1
  74. package/esm/runtime/types/theme.d.ts +8 -2
  75. package/esm/shape/connector/connector.js +19 -30
  76. package/esm/shape/connector/connector.js.map +1 -1
  77. package/esm/shape/index.d.ts +1 -0
  78. package/esm/shape/index.js +1 -0
  79. package/esm/shape/index.js.map +1 -1
  80. package/esm/shape/line3D/line.d.ts +3 -0
  81. package/esm/shape/line3D/line.js +30 -0
  82. package/esm/shape/line3D/line.js.map +1 -0
  83. package/esm/shape/point3D/cube.js +2 -2
  84. package/esm/shape/point3D/cube.js.map +1 -1
  85. package/esm/shape/point3D/sphere.js +2 -2
  86. package/esm/shape/point3D/sphere.js.map +1 -1
  87. package/esm/theme/classic.js +54 -37
  88. package/esm/theme/classic.js.map +1 -1
  89. package/esm/theme/index.d.ts +1 -0
  90. package/esm/theme/index.js +1 -0
  91. package/esm/theme/index.js.map +1 -1
  92. package/esm/theme/light.d.ts +6 -0
  93. package/esm/theme/light.js +476 -0
  94. package/esm/theme/light.js.map +1 -0
  95. package/esm/utils/selection.d.ts +1 -1
  96. package/esm/utils/selection.js +10 -10
  97. package/esm/utils/selection.js.map +1 -1
  98. package/esm/utils/size.js +1 -1
  99. package/lib/api/chart.d.ts +9 -17
  100. package/lib/api/chart.js.map +1 -1
  101. package/lib/api/extend.d.ts +5 -1
  102. package/lib/api/extend.js.map +1 -1
  103. package/lib/api/index.d.ts +1 -1
  104. package/lib/api/index.js.map +1 -1
  105. package/lib/api/library.d.ts +6 -16
  106. package/lib/api/runtime.js +4 -1
  107. package/lib/api/runtime.js.map +1 -1
  108. package/lib/component/axis.js +14 -9
  109. package/lib/component/axis.js.map +1 -1
  110. package/lib/component/legendCategory.js +2 -2
  111. package/lib/component/legendCategory.js.map +1 -1
  112. package/lib/component/legendContinuous.js +4 -5
  113. package/lib/component/legendContinuous.js.map +1 -1
  114. package/lib/component/scrollbar.js +2 -0
  115. package/lib/component/scrollbar.js.map +1 -1
  116. package/lib/component/slider.js +2 -0
  117. package/lib/component/slider.js.map +1 -1
  118. package/lib/component/title.js +4 -2
  119. package/lib/component/title.js.map +1 -1
  120. package/lib/component/utils.d.ts +1 -1
  121. package/lib/component/utils.js +2 -3
  122. package/lib/component/utils.js.map +1 -1
  123. package/lib/composition/facetRect.js +2 -2
  124. package/lib/composition/facetRect.js.map +1 -1
  125. package/lib/composition/repeatMatrix.js +3 -3
  126. package/lib/composition/repeatMatrix.js.map +1 -1
  127. package/lib/index.d.ts +2 -2
  128. package/lib/index.js +4 -1
  129. package/lib/index.js.map +1 -1
  130. package/lib/interaction/brushHighlight.js.map +1 -1
  131. package/lib/interaction/tooltip.js +4 -3
  132. package/lib/interaction/tooltip.js.map +1 -1
  133. package/lib/lib/builtinlib.d.ts +13 -0
  134. package/lib/lib/builtinlib.js +25 -0
  135. package/lib/lib/builtinlib.js.map +1 -0
  136. package/lib/lib/core.d.ts +2 -12
  137. package/lib/lib/core.js +1 -12
  138. package/lib/lib/core.js.map +1 -1
  139. package/lib/lib/graph.d.ts +5 -0
  140. package/lib/lib/graph.js +6 -0
  141. package/lib/lib/graph.js.map +1 -1
  142. package/lib/lib/plot.d.ts +0 -5
  143. package/lib/lib/plot.js +0 -5
  144. package/lib/lib/plot.js.map +1 -1
  145. package/lib/lib/std.d.ts +6 -16
  146. package/lib/lib/threed.d.ts +1 -0
  147. package/lib/lib/threed.js +1 -0
  148. package/lib/lib/threed.js.map +1 -1
  149. package/lib/mark/index.d.ts +1 -0
  150. package/lib/mark/index.js +3 -1
  151. package/lib/mark/index.js.map +1 -1
  152. package/lib/mark/line3D.d.ts +7 -0
  153. package/lib/mark/line3D.js +69 -0
  154. package/lib/mark/line3D.js.map +1 -0
  155. package/lib/runtime/component.js +33 -30
  156. package/lib/runtime/component.js.map +1 -1
  157. package/lib/runtime/layout.js +77 -26
  158. package/lib/runtime/layout.js.map +1 -1
  159. package/lib/runtime/library.d.ts +1 -1
  160. package/lib/runtime/library.js +3 -1
  161. package/lib/runtime/library.js.map +1 -1
  162. package/lib/runtime/plot.js +42 -42
  163. package/lib/runtime/plot.js.map +1 -1
  164. package/lib/runtime/render.js +1 -4
  165. package/lib/runtime/render.js.map +1 -1
  166. package/lib/runtime/scale.js +2 -0
  167. package/lib/runtime/scale.js.map +1 -1
  168. package/lib/runtime/types/common.d.ts +3 -1
  169. package/lib/runtime/types/theme.d.ts +8 -2
  170. package/lib/shape/connector/connector.js +19 -30
  171. package/lib/shape/connector/connector.js.map +1 -1
  172. package/lib/shape/index.d.ts +1 -0
  173. package/lib/shape/index.js +8 -6
  174. package/lib/shape/index.js.map +1 -1
  175. package/lib/shape/line3D/line.d.ts +3 -0
  176. package/lib/shape/line3D/line.js +34 -0
  177. package/lib/shape/line3D/line.js.map +1 -0
  178. package/lib/shape/point3D/cube.js +1 -1
  179. package/lib/shape/point3D/cube.js.map +1 -1
  180. package/lib/shape/point3D/sphere.js +1 -1
  181. package/lib/shape/point3D/sphere.js.map +1 -1
  182. package/lib/theme/classic.js +54 -37
  183. package/lib/theme/classic.js.map +1 -1
  184. package/lib/theme/index.d.ts +1 -0
  185. package/lib/theme/index.js +3 -1
  186. package/lib/theme/index.js.map +1 -1
  187. package/lib/theme/light.d.ts +6 -0
  188. package/lib/theme/light.js +480 -0
  189. package/lib/theme/light.js.map +1 -0
  190. package/lib/utils/selection.d.ts +1 -1
  191. package/lib/utils/selection.js +10 -10
  192. package/lib/utils/selection.js.map +1 -1
  193. package/lib/utils/size.js +1 -1
  194. package/package.json +4 -4
  195. package/src/api/chart.ts +3 -0
  196. package/src/api/extend.ts +6 -1
  197. package/src/api/index.ts +1 -1
  198. package/src/api/runtime.ts +6 -3
  199. package/src/component/axis.ts +17 -13
  200. package/src/component/legendCategory.ts +3 -5
  201. package/src/component/legendContinuous.ts +4 -5
  202. package/src/component/scrollbar.ts +4 -1
  203. package/src/component/slider.ts +4 -1
  204. package/src/component/title.ts +3 -3
  205. package/src/component/utils.ts +1 -3
  206. package/src/composition/facetRect.ts +4 -3
  207. package/src/composition/repeatMatrix.ts +4 -3
  208. package/src/index.ts +10 -1
  209. package/src/interaction/brushHighlight.ts +1 -1
  210. package/src/interaction/tooltip.ts +5 -3
  211. package/src/lib/builtinlib.ts +28 -0
  212. package/src/lib/core.ts +4 -25
  213. package/src/lib/graph.ts +7 -1
  214. package/src/lib/plot.ts +2 -7
  215. package/src/lib/threed.ts +2 -1
  216. package/src/mark/index.ts +1 -0
  217. package/src/mark/line3D.ts +81 -0
  218. package/src/runtime/component.ts +57 -30
  219. package/src/runtime/layout.ts +91 -31
  220. package/src/runtime/library.ts +4 -1
  221. package/src/runtime/plot.ts +62 -40
  222. package/src/runtime/render.ts +1 -6
  223. package/src/runtime/scale.ts +1 -0
  224. package/src/runtime/types/common.ts +2 -0
  225. package/src/runtime/types/theme.ts +8 -2
  226. package/src/shape/connector/connector.ts +41 -47
  227. package/src/shape/index.ts +1 -0
  228. package/src/shape/line3D/line.ts +29 -0
  229. package/src/shape/point3D/cube.ts +2 -2
  230. package/src/shape/point3D/sphere.ts +2 -2
  231. package/src/shape/utils.ts +2 -2
  232. package/src/theme/classic.ts +54 -37
  233. package/src/theme/index.ts +1 -0
  234. package/src/theme/light.ts +483 -0
  235. package/src/utils/selection.ts +11 -11
  236. package/src/utils/size.ts +1 -1
@@ -3,21 +3,35 @@ import { ThemeComponent as TC, Theme } from '../runtime';
3
3
  export type ClassicOptions = Theme;
4
4
 
5
5
  const COLORS = {
6
- BLACK: '#000',
6
+ BLACK: '#1D2129',
7
7
  WHITE: '#fff',
8
8
  STROKE: '#416180',
9
+ DEFAULT: '#5B8FF9',
10
+ BACKGROUND: 'transparent',
9
11
  };
10
12
 
11
- const BACKGROUND_COLOR = 'transparent';
13
+ const PADDING = {
14
+ 1: 8,
15
+ 2: 12,
16
+ 3: 20,
17
+ };
12
18
 
13
- const DEFAULT_COLOR = '#5B8FF9';
19
+ const ALPHA = {
20
+ 90: 0.9,
21
+ 65: 0.65,
22
+ 45: 0.45,
23
+ 25: 0.25,
24
+ 10: 0.1,
25
+ };
14
26
 
15
27
  /**
16
28
  * Default theme.
17
29
  */
18
30
  export const Classic: TC<ClassicOptions> = (options) => {
19
31
  const defaultOptions: Theme = {
20
- color: DEFAULT_COLOR,
32
+ padding: 'auto',
33
+ margin: 16,
34
+ color: COLORS.DEFAULT,
21
35
  size: 1,
22
36
  category10: 'category10',
23
37
  category20: 'category20',
@@ -37,7 +51,7 @@ export const Classic: TC<ClassicOptions> = (options) => {
37
51
  delay: 0,
38
52
  },
39
53
  view: {
40
- viewFill: BACKGROUND_COLOR,
54
+ viewFill: COLORS.BACKGROUND,
41
55
  plotFill: 'transparent',
42
56
  mainFill: 'transparent',
43
57
  contentFill: 'transparent',
@@ -200,48 +214,48 @@ export const Classic: TC<ClassicOptions> = (options) => {
200
214
  },
201
215
  axis: {
202
216
  arrow: false,
203
- gridLineDash: [0, 0],
217
+ gridLineDash: [3, 4],
204
218
  gridLineWidth: 0.5,
205
219
  gridStroke: COLORS.BLACK,
206
- gridStrokeOpacity: 0.05,
220
+ gridStrokeOpacity: ALPHA[10],
207
221
  labelAlign: 'horizontal',
208
222
  labelFill: COLORS.BLACK,
209
- labelFillOpacity: 0.65,
223
+ labelOpacity: ALPHA[45],
210
224
  labelFontSize: 12,
211
- labelFontWeight: 'lighter',
212
- labelSpacing: 8, // spacing between label and it's tick
225
+ labelFontWeight: 'normal',
226
+ labelSpacing: PADDING[1], // spacing between label and it's tick
213
227
  line: false,
214
228
  lineLineWidth: 0.5,
215
229
  lineStroke: COLORS.BLACK,
216
- lineStrokeOpacity: 0.45,
230
+ lineStrokeOpacity: ALPHA[45],
217
231
  tickLength: 4,
218
232
  tickLineWidth: 1,
219
233
  tickStroke: COLORS.BLACK,
220
- tickStrokeOpacity: 0.25,
234
+ tickOpacity: ALPHA[45],
221
235
  titleFill: COLORS.BLACK,
222
- titleFillOpacity: 0.65,
236
+ titleOpacity: ALPHA[90],
223
237
  titleFontSize: 12,
224
238
  titleFontWeight: 'normal',
225
239
  titleSpacing: 12,
226
240
  titleTransformOrigin: 'center',
241
+ lineArrowOffset: 6,
242
+ lineArrowSize: 6,
227
243
  },
228
244
  axisTop: {
229
245
  gridDirection: 'positive',
230
246
  labelDirection: 'negative',
231
- labelSpacing: 4,
232
247
  tickDirection: 'negative',
233
248
  titlePosition: 'top',
234
- titleSpacing: 0,
249
+ titleSpacing: 12,
235
250
  titleTextBaseline: 'middle',
236
251
  },
237
252
  axisBottom: {
238
253
  gridDirection: 'negative',
239
254
  labelDirection: 'positive',
240
- labelSpacing: 4,
241
255
  labelAutoRotate: true,
242
256
  tickDirection: 'positive',
243
257
  titlePosition: 'bottom',
244
- titleSpacing: 10,
258
+ titleSpacing: 12,
245
259
  titleTextBaseline: 'bottom',
246
260
  },
247
261
  axisLeft: {
@@ -251,7 +265,7 @@ export const Classic: TC<ClassicOptions> = (options) => {
251
265
  labelSpacing: 4,
252
266
  tickDirection: 'negative',
253
267
  titlePosition: 'left',
254
- titleSpacing: 10,
268
+ titleSpacing: 12,
255
269
  titleTextBaseline: 'middle',
256
270
  titleDirection: 'vertical',
257
271
  titleTransformOrigin: 'center',
@@ -262,7 +276,8 @@ export const Classic: TC<ClassicOptions> = (options) => {
262
276
  labelSpacing: 4,
263
277
  tickDirection: 'positive',
264
278
  titlePosition: 'right',
265
- titleSpacing: 0,
279
+ labelAutoRotate: false,
280
+ titleSpacing: 12,
266
281
  titleTextBaseline: 'top',
267
282
  titleDirection: 'vertical',
268
283
  titleTransformOrigin: 'center',
@@ -294,23 +309,23 @@ export const Classic: TC<ClassicOptions> = (options) => {
294
309
  backgroundFill: 'transparent',
295
310
  itemBackgroundFill: 'transparent',
296
311
  itemLabelFill: COLORS.BLACK,
297
- itemLabelFillOpacity: 0.65,
312
+ itemLabelFillOpacity: ALPHA[90],
298
313
  itemLabelFontSize: 12,
299
- itemLabelFontWeight: 'lighter',
314
+ itemLabelFontWeight: 'normal',
300
315
  itemMarkerFillOpacity: 1,
301
316
  itemMarkerSize: 8,
302
- itemSpacing: [5, 8],
317
+ itemSpacing: [PADDING[1], PADDING[1]],
303
318
  itemValueFill: COLORS.BLACK,
304
319
  itemValueFillOpacity: 0.65,
305
320
  itemValueFontSize: 12,
306
- itemValueFontWeight: 'lighter',
321
+ itemValueFontWeight: 'normal',
307
322
  navButtonFill: COLORS.BLACK,
308
323
  navButtonFillOpacity: 0.65,
309
324
  navPageNumFill: COLORS.BLACK,
310
325
  navPageNumFillOpacity: 0.45,
311
326
  navPageNumFontSize: 12,
312
327
  padding: 8,
313
- title: true,
328
+ title: false,
314
329
  titleFill: COLORS.BLACK,
315
330
  titleFillOpacity: 0.65,
316
331
  titleFontSize: 12,
@@ -318,13 +333,15 @@ export const Classic: TC<ClassicOptions> = (options) => {
318
333
  titleSpacing: 4,
319
334
  tickStroke: COLORS.BLACK,
320
335
  tickStrokeOpacity: 0.25,
321
- rowPadding: 0,
322
- colPadding: 8,
336
+ rowPadding: PADDING[1],
337
+ colPadding: PADDING[2],
338
+ maxRows: 3,
339
+ maxCols: 3,
323
340
  },
324
341
  legendContinuous: {
325
342
  handleHeight: 12,
326
343
  handleLabelFill: COLORS.BLACK,
327
- handleLabelFillOpacity: 0.45,
344
+ handleLabelFillOpacity: ALPHA[45],
328
345
  handleLabelFontSize: 12,
329
346
  handleLabelFontWeight: 'normal',
330
347
  handleMarkerFill: COLORS.BLACK,
@@ -334,9 +351,9 @@ export const Classic: TC<ClassicOptions> = (options) => {
334
351
  handleMarkerStrokeOpacity: 0.25,
335
352
  handleWidth: 10,
336
353
  labelFill: COLORS.BLACK,
337
- labelFillOpacity: 0.45,
354
+ labelFillOpacity: ALPHA[45],
338
355
  labelFontSize: 12,
339
- labelFontWeight: 'lighter',
356
+ labelFontWeight: 'normal',
340
357
  labelSpacing: 3,
341
358
  tick: true,
342
359
  tickLength: 12,
@@ -350,9 +367,9 @@ export const Classic: TC<ClassicOptions> = (options) => {
350
367
  titleFontSize: 12,
351
368
  titleSpacing: 4,
352
369
  titleFontWeight: 'normal',
353
- titleFillOpacity: 0.65,
370
+ titleFillOpacity: ALPHA[90],
354
371
  tickStroke: COLORS.BLACK,
355
- tickStrokeOpacity: 0.25,
372
+ tickStrokeOpacity: ALPHA[45],
356
373
  },
357
374
  label: {
358
375
  fill: COLORS.BLACK,
@@ -386,7 +403,7 @@ export const Classic: TC<ClassicOptions> = (options) => {
386
403
  trackSize: 16,
387
404
  trackFill: COLORS.STROKE,
388
405
  trackFillOpacity: 1,
389
- selectionFill: DEFAULT_COLOR,
406
+ selectionFill: COLORS.DEFAULT,
390
407
  selectionFillOpacity: 0.15,
391
408
  handleIconSize: 10,
392
409
  handleIconFill: '#f7f7f7',
@@ -401,8 +418,8 @@ export const Classic: TC<ClassicOptions> = (options) => {
401
418
  handleLabelFontWeight: 'normal',
402
419
  },
403
420
  scrollbar: {
404
- padding: [2, 2, 2, 2],
405
- trackSize: 10,
421
+ padding: [0, 0, 0, 0],
422
+ trackSize: 6,
406
423
  isRound: true,
407
424
  slidable: true,
408
425
  scrollable: true,
@@ -415,12 +432,12 @@ export const Classic: TC<ClassicOptions> = (options) => {
415
432
  title: {
416
433
  spacing: 8,
417
434
  titleFill: COLORS.BLACK,
418
- titleFillOpacity: 0.85,
419
- titleFontSize: 14,
435
+ titleFillOpacity: ALPHA[90],
436
+ titleFontSize: 16,
420
437
  titleFontWeight: 'bold',
421
438
  titleTextBaseline: 'top',
422
439
  subtitleFill: COLORS.BLACK,
423
- subtitleFillOpacity: 0.65,
440
+ subtitleFillOpacity: ALPHA[65],
424
441
  subtitleFontSize: 12,
425
442
  subtitleFontWeight: 'normal',
426
443
  subtitleTextBaseline: 'top',
@@ -1,3 +1,4 @@
1
1
  export { Classic } from './classic';
2
2
  export { ClassicDark } from './classicDark';
3
3
  export { Academy } from './academy';
4
+ export { Light } from './light';
@@ -0,0 +1,483 @@
1
+ import { ThemeComponent as TC, Theme } from '../runtime';
2
+
3
+ export type LightOptions = Theme;
4
+
5
+ const COLORS = {
6
+ BLACK: '#1D2129',
7
+ WHITE: '#fff',
8
+ STROKE: '#416180',
9
+ DEFAULT: '#1783FF',
10
+ BACKGROUND: 'transparent',
11
+ };
12
+
13
+ const PADDING = {
14
+ 1: 8,
15
+ 2: 12,
16
+ 3: 20,
17
+ };
18
+
19
+ const ALPHA = {
20
+ 90: 0.9,
21
+ 65: 0.65,
22
+ 45: 0.45,
23
+ 25: 0.25,
24
+ 10: 0.1,
25
+ };
26
+
27
+ /**
28
+ * Default theme.
29
+ */
30
+ export const Light: TC<LightOptions> = (options) => {
31
+ const defaultOptions: Theme = {
32
+ padding: 'auto',
33
+ margin: 16,
34
+ color: COLORS.DEFAULT,
35
+ size: 1,
36
+ category10: [
37
+ '#1783FF',
38
+ '#00C9C9',
39
+ '#F0884D',
40
+ '#D580FF',
41
+ '#7863FF',
42
+ '#60C42D',
43
+ '#BD8F24',
44
+ '#FF80CA',
45
+ '#2491B3',
46
+ '#17C76F',
47
+ ],
48
+ category20: [
49
+ '#1783FF',
50
+ '#00C9C9',
51
+ '#F0884D',
52
+ '#D580FF',
53
+ '#7863FF',
54
+ '#60C42D',
55
+ '#BD8F24',
56
+ '#FF80CA',
57
+ '#2491B3',
58
+ '#17C76F',
59
+ '#8093FF',
60
+ '#66C1DF',
61
+ '#EFBF77',
62
+ '#FFAFFA',
63
+ '#D5A5FA',
64
+ '#78DF78',
65
+ '#ECD74D',
66
+ '#FFAFC8',
67
+ '#73A2D1',
68
+ '#74DDCB',
69
+ ],
70
+ enter: {
71
+ duration: 300,
72
+ fill: 'both',
73
+ delay: 0,
74
+ },
75
+ update: {
76
+ duration: 300,
77
+ fill: 'both',
78
+ delay: 0,
79
+ },
80
+ exit: {
81
+ duration: 300,
82
+ fill: 'both',
83
+ delay: 0,
84
+ },
85
+ view: {
86
+ viewFill: COLORS.BACKGROUND,
87
+ plotFill: 'transparent',
88
+ mainFill: 'transparent',
89
+ contentFill: 'transparent',
90
+ },
91
+ line: {
92
+ line: {
93
+ fill: '',
94
+ strokeOpacity: 1,
95
+ lineWidth: 1,
96
+ },
97
+ },
98
+ point: {
99
+ point: {
100
+ r: 3,
101
+ fillOpacity: 0.95,
102
+ lineWidth: 0,
103
+ },
104
+ hollow: {
105
+ r: 3,
106
+ strokeOpacity: 0.95,
107
+ lineWidth: 1,
108
+ },
109
+ plus: {
110
+ r: 3,
111
+ strokeOpacity: 0.95,
112
+ lineWidth: 3,
113
+ },
114
+ diamond: {
115
+ r: 3,
116
+ strokeOpacity: 0.95,
117
+ lineWidth: 1,
118
+ },
119
+ },
120
+ interval: {
121
+ rect: {
122
+ fillOpacity: 0.95,
123
+ },
124
+ hollow: {
125
+ fill: '',
126
+ strokeOpacity: 1,
127
+ lineWidth: 2,
128
+ },
129
+ },
130
+ area: {
131
+ area: {
132
+ fillOpacity: 0.85,
133
+ lineWidth: 0,
134
+ },
135
+ },
136
+ polygon: {
137
+ polygon: {
138
+ fillOpacity: 0.95,
139
+ },
140
+ },
141
+ cell: {
142
+ cell: {
143
+ fillOpacity: 0.95,
144
+ },
145
+ hollow: {
146
+ fill: '',
147
+ strokeOpacity: 1,
148
+ lineWidth: 2,
149
+ },
150
+ },
151
+ rect: {
152
+ rect: {
153
+ fillOpacity: 0.95,
154
+ },
155
+ hollow: {
156
+ fill: '',
157
+ strokeOpacity: 1,
158
+ lineWidth: 2,
159
+ },
160
+ },
161
+ link: {
162
+ link: {
163
+ fill: '',
164
+ strokeOpacity: 1,
165
+ },
166
+ },
167
+ vector: {
168
+ vector: {
169
+ fillOpacity: 1,
170
+ },
171
+ },
172
+ box: {
173
+ box: {
174
+ fillOpacity: 0.95,
175
+ stroke: COLORS.BLACK,
176
+ lineWidth: 1,
177
+ },
178
+ },
179
+ text: {
180
+ text: {
181
+ fill: '#1D2129',
182
+ fontSize: 12,
183
+ strokeWidth: 0,
184
+ connectorStroke: COLORS.STROKE,
185
+ connectorStrokeOpacity: 0.45,
186
+ connectorLineWidth: 1,
187
+ backgroundFill: COLORS.STROKE,
188
+ backgroundFillOpacity: 0.15,
189
+ backgroundPadding: [2, 4],
190
+ startMarkerSymbol: 'circle',
191
+ startMarkerSize: 4,
192
+ endMarkerSymbol: 'circle',
193
+ endMarkerSize: 4,
194
+ },
195
+ badge: {
196
+ fill: '#1D2129',
197
+ fillOpacity: 0.65,
198
+ strokeWidth: 0,
199
+ fontSize: 10,
200
+ textAlign: 'center',
201
+ textBaseline: 'middle',
202
+ markerFill: COLORS.STROKE,
203
+ markerFillOpacity: 0.25,
204
+ markerStrokeOpacity: 0,
205
+ },
206
+ },
207
+ lineX: {
208
+ line: {
209
+ stroke: COLORS.STROKE,
210
+ strokeOpacity: 0.45,
211
+ lineWidth: 1,
212
+ },
213
+ },
214
+ lineY: {
215
+ line: {
216
+ stroke: COLORS.STROKE,
217
+ strokeOpacity: 0.45,
218
+ lineWidth: 1,
219
+ },
220
+ },
221
+ rangeX: {
222
+ range: {
223
+ fill: COLORS.STROKE,
224
+ fillOpacity: 0.15,
225
+ lineWidth: 0,
226
+ },
227
+ },
228
+ rangeY: {
229
+ range: {
230
+ fill: COLORS.STROKE,
231
+ fillOpacity: 0.15,
232
+ lineWidth: 0,
233
+ },
234
+ },
235
+ connector: {
236
+ connector: {
237
+ stroke: COLORS.STROKE,
238
+ strokeOpacity: 0.45,
239
+ lineWidth: 1,
240
+ connectLength1: 12,
241
+ endMarker: true,
242
+ endMarkerSize: 6,
243
+ endMarkerFill: COLORS.STROKE,
244
+ endMarkerFillOpacity: 0.95,
245
+ },
246
+ },
247
+ axis: {
248
+ arrow: false,
249
+ gridLineDash: [3, 4],
250
+ gridLineWidth: 0.5,
251
+ gridStroke: COLORS.BLACK,
252
+ gridStrokeOpacity: ALPHA[10],
253
+ labelAlign: 'horizontal',
254
+ labelFill: COLORS.BLACK,
255
+ labelOpacity: ALPHA[45],
256
+ labelFontSize: 12,
257
+ labelFontWeight: 'normal',
258
+ labelSpacing: PADDING[1], // spacing between label and it's tick
259
+ line: false,
260
+ lineLineWidth: 0.5,
261
+ lineStroke: COLORS.BLACK,
262
+ lineStrokeOpacity: ALPHA[45],
263
+ tickLength: 4,
264
+ tickLineWidth: 1,
265
+ tickStroke: COLORS.BLACK,
266
+ tickOpacity: ALPHA[45],
267
+ titleFill: COLORS.BLACK,
268
+ titleOpacity: ALPHA[90],
269
+ titleFontSize: 12,
270
+ titleFontWeight: 'normal',
271
+ titleSpacing: 12,
272
+ titleTransformOrigin: 'center',
273
+ lineArrowOffset: 6,
274
+ lineArrowSize: 6,
275
+ },
276
+ axisTop: {
277
+ gridDirection: 'positive',
278
+ labelDirection: 'negative',
279
+ tickDirection: 'negative',
280
+ titlePosition: 'top',
281
+ titleSpacing: 12,
282
+ labelSpacing: 4,
283
+ titleTextBaseline: 'middle',
284
+ },
285
+ axisBottom: {
286
+ gridDirection: 'negative',
287
+ labelDirection: 'positive',
288
+ labelAutoRotate: true,
289
+ tickDirection: 'positive',
290
+ titlePosition: 'bottom',
291
+ titleSpacing: 12,
292
+ labelSpacing: 4,
293
+ titleTextBaseline: 'bottom',
294
+ },
295
+ axisLeft: {
296
+ gridDirection: 'positive',
297
+ labelAutoRotate: false,
298
+ labelDirection: 'negative',
299
+ labelSpacing: 4,
300
+ tickDirection: 'negative',
301
+ titlePosition: 'left',
302
+ titleSpacing: 12,
303
+ titleTextBaseline: 'middle',
304
+ titleDirection: 'vertical',
305
+ titleTransformOrigin: 'center',
306
+ },
307
+ axisRight: {
308
+ gridDirection: 'negative',
309
+ labelDirection: 'positive',
310
+ labelSpacing: 4,
311
+ tickDirection: 'positive',
312
+ titlePosition: 'right',
313
+ labelAutoRotate: false,
314
+ titleSpacing: 12,
315
+ titleTextBaseline: 'top',
316
+ titleDirection: 'vertical',
317
+ titleTransformOrigin: 'center',
318
+ },
319
+ axisLinear: {
320
+ girdClosed: true,
321
+ gridConnect: 'arc',
322
+ gridDirection: 'negative',
323
+ gridType: 'surround',
324
+ titlePosition: 'top',
325
+ titleSpacing: 0,
326
+ },
327
+ axisArc: {
328
+ title: false,
329
+ titlePosition: 'inner',
330
+ line: false,
331
+ tick: true,
332
+ labelSpacing: 4,
333
+ },
334
+ axisRadar: {
335
+ girdClosed: true,
336
+ gridStrokeOpacity: 0.3,
337
+ gridType: 'surround',
338
+ label: false,
339
+ tick: false,
340
+ titlePosition: 'start',
341
+ },
342
+ legendCategory: {
343
+ backgroundFill: 'transparent',
344
+ itemBackgroundFill: 'transparent',
345
+ itemLabelFill: COLORS.BLACK,
346
+ itemLabelFillOpacity: ALPHA[90],
347
+ itemLabelFontSize: 12,
348
+ itemLabelFontWeight: 'normal',
349
+ itemMarkerFillOpacity: 1,
350
+ itemMarkerSize: 8,
351
+ itemSpacing: [PADDING[1], PADDING[1]],
352
+ itemValueFill: COLORS.BLACK,
353
+ itemValueFillOpacity: 0.65,
354
+ itemValueFontSize: 12,
355
+ itemValueFontWeight: 'normal',
356
+ navButtonFill: COLORS.BLACK,
357
+ navButtonFillOpacity: 0.65,
358
+ navPageNumFill: COLORS.BLACK,
359
+ navPageNumFillOpacity: 0.45,
360
+ navPageNumFontSize: 12,
361
+ padding: 8,
362
+ title: false,
363
+ titleFill: COLORS.BLACK,
364
+ titleFillOpacity: 0.65,
365
+ titleFontSize: 12,
366
+ titleFontWeight: 'normal',
367
+ titleSpacing: 4,
368
+ tickStroke: COLORS.BLACK,
369
+ tickStrokeOpacity: 0.25,
370
+ rowPadding: PADDING[1],
371
+ colPadding: PADDING[2],
372
+ maxRows: 3,
373
+ maxCols: 3,
374
+ },
375
+ legendContinuous: {
376
+ handleHeight: 12,
377
+ handleLabelFill: COLORS.BLACK,
378
+ handleLabelFillOpacity: ALPHA[45],
379
+ handleLabelFontSize: 12,
380
+ handleLabelFontWeight: 'normal',
381
+ handleMarkerFill: COLORS.BLACK,
382
+ handleMarkerFillOpacity: 0.6,
383
+ handleMarkerLineWidth: 1,
384
+ handleMarkerStroke: COLORS.BLACK,
385
+ handleMarkerStrokeOpacity: 0.25,
386
+ handleWidth: 10,
387
+ labelFill: COLORS.BLACK,
388
+ labelFillOpacity: ALPHA[45],
389
+ labelFontSize: 12,
390
+ labelFontWeight: 'normal',
391
+ labelSpacing: 3,
392
+ tick: true,
393
+ tickLength: 12,
394
+ ribbonSize: 12,
395
+ ribbonFill: '#aaa',
396
+ handle: true,
397
+ handleLabel: false,
398
+ handleShape: 'slider',
399
+ handleIconSize: 12 / 1.8,
400
+ indicator: false,
401
+ titleFontSize: 12,
402
+ titleSpacing: 4,
403
+ titleFontWeight: 'normal',
404
+ titleFillOpacity: ALPHA[90],
405
+ tickStroke: COLORS.BLACK,
406
+ tickStrokeOpacity: ALPHA[45],
407
+ },
408
+ label: {
409
+ fill: COLORS.BLACK,
410
+ fillOpacity: 0.65,
411
+ fontSize: 12,
412
+ fontWeight: 'normal',
413
+ stroke: undefined,
414
+ offset: 12,
415
+ connectorStroke: COLORS.BLACK,
416
+ connectorStrokeOpacity: 0.45,
417
+ connectorLineWidth: 1,
418
+ connectorLength: 12,
419
+ connectorLength2: 8,
420
+ connectorDistance: 4,
421
+ },
422
+ innerLabel: {
423
+ fill: COLORS.WHITE,
424
+ fontSize: 12,
425
+ fillOpacity: 0.85,
426
+ fontWeight: 'normal',
427
+ stroke: undefined,
428
+ offset: 0,
429
+ },
430
+ htmlLabel: {
431
+ fontSize: 12,
432
+ opacity: 0.65,
433
+ color: COLORS.BLACK,
434
+ fontWeight: 'normal',
435
+ },
436
+ slider: {
437
+ trackSize: 16,
438
+ trackFill: COLORS.STROKE,
439
+ trackFillOpacity: 1,
440
+ selectionFill: COLORS.DEFAULT,
441
+ selectionFillOpacity: 0.15,
442
+ handleIconSize: 10,
443
+ handleIconFill: '#f7f7f7',
444
+ handleIconFillOpacity: 1,
445
+ handleIconStroke: COLORS.BLACK,
446
+ handleIconStrokeOpacity: 0.25,
447
+ handleIconLineWidth: 1,
448
+ handleIconRadius: 2,
449
+ handleLabelFill: COLORS.BLACK,
450
+ handleLabelFillOpacity: 0.45,
451
+ handleLabelFontSize: 12,
452
+ handleLabelFontWeight: 'normal',
453
+ },
454
+ scrollbar: {
455
+ padding: [0, 0, 0, 0],
456
+ trackSize: 6,
457
+ isRound: true,
458
+ slidable: true,
459
+ scrollable: true,
460
+ trackFill: '#e5e5e5',
461
+ trackFillOpacity: 0,
462
+ thumbFill: '#000',
463
+ thumbFillOpacity: 0.15,
464
+ thumbHighlightedFillOpacity: 0.2,
465
+ },
466
+ title: {
467
+ spacing: 8,
468
+ titleFill: COLORS.BLACK,
469
+ titleFillOpacity: ALPHA[90],
470
+ titleFontSize: 16,
471
+ titleFontWeight: 'bold',
472
+ titleTextBaseline: 'top',
473
+ subtitleFill: COLORS.BLACK,
474
+ subtitleFillOpacity: ALPHA[65],
475
+ subtitleFontSize: 12,
476
+ subtitleFontWeight: 'normal',
477
+ subtitleTextBaseline: 'top',
478
+ },
479
+ };
480
+ return Object.assign({}, defaultOptions, options);
481
+ };
482
+
483
+ Light.props = {};