@orbcharts/plugins-basic 3.0.0-alpha.49 → 3.0.0-alpha.51

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 (91) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-plugins-basic.es.js +6325 -6272
  3. package/dist/orbcharts-plugins-basic.umd.js +8 -8
  4. package/dist/src/base/BaseGroupAxis.d.ts +1 -0
  5. package/dist/src/grid/index.d.ts +1 -1
  6. package/dist/src/grid/plugins/BarsPN.d.ts +1 -0
  7. package/dist/src/grid/types.d.ts +3 -2
  8. package/dist/src/multiGrid/defaults.d.ts +2 -1
  9. package/dist/src/multiGrid/index.d.ts +2 -0
  10. package/dist/src/multiGrid/multiGridObservables.d.ts +1 -1
  11. package/dist/src/multiGrid/plugins/MultiValueStackAxis.d.ts +1 -0
  12. package/dist/src/multiGrid/plugins/OverlappingValueStackAxes.d.ts +1 -0
  13. package/dist/src/multiGrid/types.d.ts +3 -0
  14. package/dist/src/series/types.d.ts +2 -3
  15. package/package.json +42 -42
  16. package/src/base/BaseBarStack.ts +778 -778
  17. package/src/base/BaseBars.ts +764 -764
  18. package/src/base/BaseBarsTriangle.ts +672 -672
  19. package/src/base/BaseDots.ts +513 -502
  20. package/src/base/BaseGroupAxis.ts +562 -496
  21. package/src/base/BaseLegend.ts +641 -641
  22. package/src/base/BaseLineAreas.ts +625 -625
  23. package/src/base/BaseLines.ts +699 -699
  24. package/src/base/BaseValueAxis.ts +478 -478
  25. package/src/base/types.ts +2 -2
  26. package/src/grid/defaults.ts +125 -121
  27. package/src/grid/gridObservables.ts +248 -247
  28. package/src/grid/index.ts +15 -15
  29. package/src/grid/plugins/BarStack.ts +43 -50
  30. package/src/grid/plugins/Bars.ts +44 -51
  31. package/src/grid/plugins/{BarsDiverging.ts → BarsPN.ts} +41 -41
  32. package/src/grid/plugins/BarsTriangle.ts +42 -50
  33. package/src/grid/plugins/Dots.ts +37 -37
  34. package/src/grid/plugins/GridLegend.ts +59 -59
  35. package/src/grid/plugins/GroupAux.ts +645 -645
  36. package/src/grid/plugins/GroupAxis.ts +35 -42
  37. package/src/grid/plugins/LineAreas.ts +39 -39
  38. package/src/grid/plugins/Lines.ts +38 -38
  39. package/src/grid/plugins/ScalingArea.ts +173 -173
  40. package/src/grid/plugins/ValueAxis.ts +36 -43
  41. package/src/grid/plugins/ValueStackAxis.ts +38 -79
  42. package/src/grid/types.ts +122 -120
  43. package/src/index.ts +9 -9
  44. package/src/multiGrid/defaults.ts +152 -147
  45. package/src/multiGrid/index.ts +14 -12
  46. package/src/multiGrid/multiGridObservables.ts +44 -43
  47. package/src/multiGrid/plugins/MultiBarStack.ts +78 -78
  48. package/src/multiGrid/plugins/MultiBars.ts +77 -77
  49. package/src/multiGrid/plugins/MultiBarsTriangle.ts +77 -77
  50. package/src/multiGrid/plugins/MultiDots.ts +65 -65
  51. package/src/multiGrid/plugins/MultiGridLegend.ts +89 -89
  52. package/src/multiGrid/plugins/MultiGroupAxis.ts +69 -69
  53. package/src/multiGrid/plugins/MultiLineAreas.ts +67 -67
  54. package/src/multiGrid/plugins/MultiLines.ts +66 -66
  55. package/src/multiGrid/plugins/MultiValueAxis.ts +69 -69
  56. package/src/multiGrid/plugins/MultiValueStackAxis.ts +69 -0
  57. package/src/multiGrid/plugins/OverlappingValueAxes.ts +166 -173
  58. package/src/multiGrid/plugins/OverlappingValueStackAxes.ts +167 -0
  59. package/src/multiGrid/types.ts +71 -67
  60. package/src/noneData/defaults.ts +64 -64
  61. package/src/noneData/index.ts +3 -3
  62. package/src/noneData/plugins/Container.ts +10 -10
  63. package/src/noneData/plugins/Tooltip.ts +310 -310
  64. package/src/noneData/types.ts +26 -26
  65. package/src/series/defaults.ts +126 -126
  66. package/src/series/index.ts +9 -9
  67. package/src/series/plugins/Bubbles.ts +545 -602
  68. package/src/series/plugins/Pie.ts +576 -576
  69. package/src/series/plugins/PieEventTexts.ts +262 -262
  70. package/src/series/plugins/PieLabels.ts +304 -304
  71. package/src/series/plugins/Rose.ts +472 -472
  72. package/src/series/plugins/RoseLabels.ts +362 -362
  73. package/src/series/plugins/SeriesLegend.ts +59 -59
  74. package/src/series/seriesObservables.ts +145 -145
  75. package/src/series/seriesUtils.ts +51 -51
  76. package/src/series/types.ts +83 -83
  77. package/src/tree/defaults.ts +22 -22
  78. package/src/tree/index.ts +3 -3
  79. package/src/tree/plugins/TreeLegend.ts +59 -59
  80. package/src/tree/plugins/TreeMap.ts +305 -305
  81. package/src/tree/types.ts +23 -23
  82. package/src/utils/commonUtils.ts +21 -21
  83. package/src/utils/d3Graphics.ts +124 -124
  84. package/src/utils/d3Utils.ts +73 -73
  85. package/src/utils/observables.ts +14 -14
  86. package/src/utils/orbchartsUtils.ts +100 -100
  87. package/tsconfig.dev.json +16 -16
  88. package/tsconfig.json +13 -13
  89. package/tsconfig.prod.json +13 -13
  90. package/vite.config.js +49 -49
  91. package/dist/src/grid/plugins/BarsDiverging.d.ts +0 -1
package/src/base/types.ts CHANGED
@@ -1,3 +1,3 @@
1
- export interface BasePluginFn<Context> {
2
- (pluginName: string, context: Context): () => void // return unsubscribe function
1
+ export interface BasePluginFn<Context> {
2
+ (pluginName: string, context: Context): () => void // return unsubscribe function
3
3
  }
@@ -1,121 +1,125 @@
1
- import type {
2
- LinesParams,
3
- LineAreasParams,
4
- GroupAuxParams,
5
- DotsParams,
6
- BarsParams,
7
- BarStackParams,
8
- BarsTriangleParams,
9
- GroupAxisParams,
10
- ValueAxisParams,
11
- ValueStackAxisParams,
12
- ScalingAreaParams,
13
- GridLegendParams } from './types'
14
-
15
- export const DEFAULT_LINES_PARAMS: LinesParams = {
16
- lineCurve: 'curveLinear',
17
- lineWidth: 2
18
- }
19
-
20
- export const DEFAULT_LINE_AREAS_PARAMS: LineAreasParams = {
21
- lineCurve: 'curveLinear',
22
- linearGradientOpacity: [1, 0]
23
- }
24
-
25
- export const DEFAULT_DOTS_PARAMS: DotsParams = {
26
- radius: 4,
27
- fillColorType: 'white',
28
- strokeColorType: 'series',
29
- strokeWidth: 2,
30
- onlyShowHighlighted: false
31
- }
32
-
33
- export const DEFAULT_GROUP_AREA_PARAMS: GroupAuxParams = {
34
- showLine: true,
35
- showLabel: true,
36
- lineDashArray: '3, 3',
37
- lineColorType: 'primary',
38
- labelColorType: 'primary',
39
- labelTextColorType: 'background',
40
- labelTextFormat: text => text,
41
- labelPadding: 24,
42
- }
43
-
44
- export const DEFAULT_BARS_PARAMS: BarsParams = {
45
- // barType: 'rect',
46
- barWidth: 0,
47
- barPadding: 1,
48
- barGroupPadding: 40,
49
- barRadius: false,
50
- }
51
-
52
- export const DEFAULT_BARS_DIVERGING_PARAMS: BarsParams = {
53
- ...DEFAULT_BARS_PARAMS
54
- }
55
-
56
- export const DEFAULT_BAR_STACK_PARAMS: BarStackParams = {
57
- barWidth: 0,
58
- barGroupPadding: 10,
59
- barRadius: false,
60
- }
61
-
62
- export const DEFAULT_BARS_TRIANGLE_PARAMS: BarsTriangleParams = {
63
- barWidth: 0,
64
- barPadding: 1,
65
- barGroupPadding: 20,
66
- linearGradientOpacity: [1, 0]
67
- }
68
-
69
- export const DEFAULT_GROUP_AXIS_PARAMS: GroupAxisParams = {
70
- // labelAnchor: 'start',
71
- labelOffset: [0, 0],
72
- labelColorType: 'primary',
73
- axisLineVisible: true,
74
- axisLineColorType: 'primary',
75
- tickFormat: text => text,
76
- tickLineVisible: true,
77
- tickPadding: 20,
78
- tickFullLine: false,
79
- tickFullLineDasharray: 'none',
80
- tickColorType: 'secondary',
81
- tickTextRotate: 0,
82
- tickTextColorType: 'primary'
83
- }
84
-
85
- export const DEFAULT_VALUE_AXIS_PARAMS: ValueAxisParams = {
86
- // labelAnchor: 'end',
87
- labelOffset: [0, 0],
88
- labelColorType: 'primary',
89
- axisLineVisible: false,
90
- axisLineColorType: 'primary',
91
- ticks: 4,
92
- tickFormat: ',.0f',
93
- tickLineVisible: true,
94
- tickPadding: 20,
95
- tickFullLine: true,
96
- tickFullLineDasharray: 'none',
97
- tickColorType: 'secondary',
98
- tickTextRotate: 0,
99
- tickTextColorType: 'primary'
100
- }
101
-
102
- export const DEFAULT_VALUE_STACK_AXIS_PARAMS: ValueStackAxisParams = DEFAULT_VALUE_AXIS_PARAMS
103
-
104
- export const DEFAULT_SCALING_AREA_PARAMS: ScalingAreaParams = {
105
-
106
- }
107
-
108
- export const DEFAULT_GRID_LEGEND_PARAMS: GridLegendParams = {
109
- position: 'right',
110
- justify: 'end',
111
- padding: 28,
112
- // offset: [0, 0],
113
- backgroundFill: 'none',
114
- backgroundStroke: 'none',
115
- gap: 10,
116
- listRectWidth: 14,
117
- listRectHeight: 14,
118
- listRectRadius: 0,
119
- // highlightEvent: false
120
- textColorType: 'primary'
121
- }
1
+ import type {
2
+ LinesParams,
3
+ LineAreasParams,
4
+ GroupAuxParams,
5
+ DotsParams,
6
+ BarsParams,
7
+ BarStackParams,
8
+ BarsTriangleParams,
9
+ GroupAxisParams,
10
+ ValueAxisParams,
11
+ ValueStackAxisParams,
12
+ ScalingAreaParams,
13
+ GridLegendParams } from './types'
14
+
15
+ export const DEFAULT_LINES_PARAMS: LinesParams = {
16
+ lineCurve: 'curveLinear',
17
+ lineWidth: 2
18
+ }
19
+
20
+ export const DEFAULT_LINE_AREAS_PARAMS: LineAreasParams = {
21
+ lineCurve: 'curveLinear',
22
+ linearGradientOpacity: [1, 0]
23
+ }
24
+
25
+ export const DEFAULT_DOTS_PARAMS: DotsParams = {
26
+ radius: 4,
27
+ fillColorType: 'white',
28
+ strokeColorType: 'series',
29
+ strokeWidth: 2,
30
+ // strokeWidthWhileHighlight: 3,
31
+ onlyShowHighlighted: false
32
+ }
33
+
34
+ export const DEFAULT_GROUP_AREA_PARAMS: GroupAuxParams = {
35
+ showLine: true,
36
+ showLabel: true,
37
+ lineDashArray: '3, 3',
38
+ lineColorType: 'primary',
39
+ labelColorType: 'primary',
40
+ labelTextColorType: 'background',
41
+ labelTextFormat: text => text,
42
+ labelPadding: 24,
43
+ }
44
+
45
+ export const DEFAULT_BARS_PARAMS: BarsParams = {
46
+ // barType: 'rect',
47
+ barWidth: 0,
48
+ barPadding: 1,
49
+ barGroupPadding: 40,
50
+ barRadius: false,
51
+ }
52
+
53
+ export const DEFAULT_BARS_DIVERGING_PARAMS: BarsParams = {
54
+ ...DEFAULT_BARS_PARAMS
55
+ }
56
+
57
+ export const DEFAULT_BAR_STACK_PARAMS: BarStackParams = {
58
+ barWidth: 0,
59
+ barGroupPadding: 10,
60
+ barRadius: false,
61
+ }
62
+
63
+ export const DEFAULT_BARS_TRIANGLE_PARAMS: BarsTriangleParams = {
64
+ barWidth: 0,
65
+ barPadding: 1,
66
+ barGroupPadding: 20,
67
+ linearGradientOpacity: [1, 0]
68
+ }
69
+
70
+ export const DEFAULT_GROUP_AXIS_PARAMS: GroupAxisParams = {
71
+ // labelAnchor: 'start',
72
+ labelOffset: [0, 0],
73
+ labelColorType: 'primary',
74
+ axisLineVisible: true,
75
+ axisLineColorType: 'primary',
76
+ ticks: 'all',
77
+ tickFormat: text => text,
78
+ tickLineVisible: true,
79
+ tickPadding: 20,
80
+ tickFullLine: false,
81
+ tickFullLineDasharray: 'none',
82
+ tickColorType: 'secondary',
83
+ tickTextRotate: 0,
84
+ tickTextColorType: 'primary',
85
+ }
86
+
87
+ export const DEFAULT_VALUE_AXIS_PARAMS: ValueAxisParams = {
88
+ // labelAnchor: 'end',
89
+ labelOffset: [0, 0],
90
+ labelColorType: 'primary',
91
+ axisLineVisible: false,
92
+ axisLineColorType: 'primary',
93
+ ticks: null,
94
+ tickFormat: ',.0f',
95
+ tickLineVisible: true,
96
+ tickPadding: 20,
97
+ tickFullLine: true,
98
+ tickFullLineDasharray: 'none',
99
+ tickColorType: 'secondary',
100
+ tickTextRotate: 0,
101
+ tickTextColorType: 'primary'
102
+ }
103
+
104
+ export const DEFAULT_VALUE_STACK_AXIS_PARAMS: ValueStackAxisParams = {
105
+ ...DEFAULT_VALUE_AXIS_PARAMS
106
+ }
107
+
108
+ export const DEFAULT_SCALING_AREA_PARAMS: ScalingAreaParams = {
109
+
110
+ }
111
+
112
+ export const DEFAULT_GRID_LEGEND_PARAMS: GridLegendParams = {
113
+ position: 'right',
114
+ justify: 'end',
115
+ padding: 28,
116
+ // offset: [0, 0],
117
+ backgroundFill: 'none',
118
+ backgroundStroke: 'none',
119
+ gap: 10,
120
+ listRectWidth: 14,
121
+ listRectHeight: 14,
122
+ listRectRadius: 0,
123
+ // highlightEvent: false
124
+ textColorType: 'primary'
125
+ }