@orbcharts/plugins-basic 3.0.0-beta.15 → 3.0.0-beta.16

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 (180) hide show
  1. package/dist/orbcharts-plugins-basic.es.js +15129 -13927
  2. package/dist/orbcharts-plugins-basic.umd.js +72 -72
  3. package/dist/{orbcharts-plugins-basic/src → src}/base/BaseBars.d.ts +3 -3
  4. package/dist/{orbcharts-plugins-basic/src → src}/base/BaseBarsTriangle.d.ts +3 -3
  5. package/dist/{orbcharts-plugins-basic/src → src}/base/BaseDots.d.ts +3 -3
  6. package/dist/{orbcharts-plugins-basic/src → src}/base/BaseLineAreas.d.ts +3 -3
  7. package/dist/{orbcharts-plugins-basic/src → src}/base/BaseLines.d.ts +3 -3
  8. package/dist/src/base/BaseRacingBars.d.ts +23 -0
  9. package/dist/src/base/BaseRacingLabels.d.ts +20 -0
  10. package/dist/src/base/BaseRacingValueLabels.d.ts +20 -0
  11. package/dist/{orbcharts-plugins-basic/src/base/BaseStackedBar.d.ts → src/base/BaseStackedBars.d.ts} +7 -7
  12. package/dist/{orbcharts-plugins-basic/src → src}/base/BaseValueAxis.d.ts +4 -7
  13. package/dist/src/base/BaseXAxis.d.ts +20 -0
  14. package/dist/src/base/BaseYAxis.d.ts +18 -0
  15. package/dist/{orbcharts-plugins-basic/src → src}/grid/defaults.d.ts +3 -3
  16. package/dist/{orbcharts-plugins-basic/src → src}/grid/gridObservables.d.ts +8 -1
  17. package/dist/{orbcharts-plugins-basic/src → src}/grid/index.d.ts +2 -2
  18. package/dist/src/grid/plugins/GroupZoom.d.ts +1 -0
  19. package/dist/src/grid/plugins/StackedBars.d.ts +1 -0
  20. package/dist/src/index.d.ts +7 -1
  21. package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/defaults.d.ts +2 -2
  22. package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/index.d.ts +1 -1
  23. package/dist/src/multiGrid/plugins/MultiStackedBars.d.ts +1 -0
  24. package/dist/src/multiValue/defaults.d.ts +13 -0
  25. package/dist/{orbcharts-plugins-basic/src → src}/multiValue/index.d.ts +5 -1
  26. package/dist/src/multiValue/multiValueObservables.d.ts +56 -0
  27. package/dist/src/multiValue/plugins/RacingBars.d.ts +1 -0
  28. package/dist/src/multiValue/plugins/RacingCounterTexts.d.ts +3 -0
  29. package/dist/src/multiValue/plugins/RacingValueAxis.d.ts +1 -0
  30. package/dist/src/multiValue/plugins/XAxis.d.ts +1 -0
  31. package/dist/src/multiValue/plugins/XYAxes.d.ts +1 -0
  32. package/dist/src/multiValue/plugins/XZoom.d.ts +1 -0
  33. package/lib/core.ts +1 -1
  34. package/package.json +4 -4
  35. package/src/base/BaseBars.ts +11 -11
  36. package/src/base/BaseBarsTriangle.ts +11 -11
  37. package/src/base/BaseDots.ts +10 -10
  38. package/src/base/BaseGroupAxis.ts +2 -0
  39. package/src/base/BaseLineAreas.ts +8 -8
  40. package/src/base/BaseLines.ts +7 -7
  41. package/src/base/BaseRacingBars.ts +552 -0
  42. package/src/base/BaseRacingLabels.ts +392 -0
  43. package/src/base/BaseRacingValueLabels.ts +403 -0
  44. package/src/base/{BaseStackedBar.ts → BaseStackedBars.ts} +22 -22
  45. package/src/base/BaseValueAxis.ts +70 -53
  46. package/src/base/BaseXAxis.ts +427 -0
  47. package/src/base/BaseYAxis.ts +389 -0
  48. package/src/grid/defaults.ts +4 -56
  49. package/src/grid/gridObservables.ts +58 -0
  50. package/src/grid/index.ts +2 -2
  51. package/src/grid/plugins/Bars.ts +2 -2
  52. package/src/grid/plugins/BarsPN.ts +2 -2
  53. package/src/grid/plugins/BarsTriangle.ts +2 -2
  54. package/src/grid/plugins/Dots.ts +2 -2
  55. package/src/grid/plugins/GridLegend.ts +7 -7
  56. package/src/grid/plugins/GroupAxis.ts +0 -24
  57. package/src/grid/plugins/{GridZoom.ts → GroupZoom.ts} +2 -2
  58. package/src/grid/plugins/LineAreas.ts +2 -2
  59. package/src/grid/plugins/Lines.ts +2 -2
  60. package/src/grid/plugins/{StackedBar.ts → StackedBars.ts} +6 -6
  61. package/src/multiGrid/defaults.ts +2 -2
  62. package/src/multiGrid/index.ts +1 -1
  63. package/src/multiGrid/multiGridObservables.ts +1 -0
  64. package/src/multiGrid/plugins/MultiBars.ts +3 -3
  65. package/src/multiGrid/plugins/MultiBarsTriangle.ts +3 -3
  66. package/src/multiGrid/plugins/MultiDots.ts +3 -3
  67. package/src/multiGrid/plugins/MultiGridLegend.ts +20 -10
  68. package/src/multiGrid/plugins/MultiLineAreas.ts +3 -3
  69. package/src/multiGrid/plugins/MultiLines.ts +3 -3
  70. package/src/multiGrid/plugins/{MultiStackedBar.ts → MultiStackedBars.ts} +7 -7
  71. package/src/multiGrid/plugins/OverlappingStackedValueAxes.ts +1 -0
  72. package/src/multiValue/defaults.ts +137 -4
  73. package/src/multiValue/index.ts +5 -1
  74. package/src/multiValue/multiValueObservables.ts +414 -44
  75. package/src/multiValue/plugins/OrdinalBubbles.ts +0 -0
  76. package/src/multiValue/plugins/OrdinalXAxis.ts +0 -0
  77. package/src/multiValue/plugins/RacingBars.ts +362 -0
  78. package/src/multiValue/plugins/RacingCounterAxis.ts +0 -0
  79. package/src/multiValue/plugins/RacingCounterTexts.ts +300 -0
  80. package/src/multiValue/plugins/RacingValueAxis.ts +115 -0
  81. package/src/multiValue/plugins/RankingAxis_legacy.ts +109 -0
  82. package/src/multiValue/plugins/Scatter.ts +13 -13
  83. package/src/multiValue/plugins/ScatterBubbles.ts +13 -13
  84. package/src/multiValue/plugins/XAxis.ts +108 -0
  85. package/src/multiValue/plugins/XYAux.ts +13 -13
  86. package/src/multiValue/plugins/XYAxes.ts +38 -528
  87. package/src/multiValue/plugins/XYAxes_legacy.ts +684 -0
  88. package/src/multiValue/plugins/{XYZoom.ts → XZoom.ts} +14 -14
  89. package/src/series/defaults.ts +2 -13
  90. package/src/series/plugins/Bubbles.ts +45 -29
  91. package/src/series/plugins/Pie.ts +5 -5
  92. package/src/series/plugins/PieEventTexts.ts +3 -3
  93. package/src/series/plugins/PieLabels.ts +5 -5
  94. package/src/series/plugins/Rose.ts +11 -11
  95. package/src/series/plugins/RoseLabels.ts +9 -9
  96. package/dist/orbcharts-plugins-basic/src/grid/plugins/GridZoom.d.ts +0 -1
  97. package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedBar.d.ts +0 -1
  98. package/dist/orbcharts-plugins-basic/src/index.d.ts +0 -7
  99. package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedBar.d.ts +0 -1
  100. package/dist/orbcharts-plugins-basic/src/multiValue/defaults.d.ts +0 -9
  101. package/dist/orbcharts-plugins-basic/src/multiValue/multiValueObservables.d.ts +0 -33
  102. package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYZoom.d.ts +0 -1
  103. /package/dist/{orbcharts-plugins-basic/lib → lib}/core-types.d.ts +0 -0
  104. /package/dist/{orbcharts-plugins-basic/lib → lib}/core.d.ts +0 -0
  105. /package/dist/{orbcharts-plugins-basic/lib → lib}/plugins-basic-types.d.ts +0 -0
  106. /package/dist/{orbcharts-plugins-basic/src → src}/base/BaseGroupAxis.d.ts +0 -0
  107. /package/dist/{orbcharts-plugins-basic/src → src}/base/BaseLegend.d.ts +0 -0
  108. /package/dist/{orbcharts-plugins-basic/src → src}/base/BaseTooltip.d.ts +0 -0
  109. /package/dist/{orbcharts-plugins-basic/src → src}/base/types.d.ts +0 -0
  110. /package/dist/{orbcharts-plugins-basic/src → src}/const.d.ts +0 -0
  111. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/Bars.d.ts +0 -0
  112. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/BarsPN.d.ts +0 -0
  113. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/BarsTriangle.d.ts +0 -0
  114. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/Dots.d.ts +0 -0
  115. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GridLegend.d.ts +0 -0
  116. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GridTooltip.d.ts +0 -0
  117. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GroupAux.d.ts +0 -0
  118. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GroupAxis.d.ts +0 -0
  119. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/LineAreas.d.ts +0 -0
  120. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/Lines.d.ts +0 -0
  121. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/StackedValueAxis.d.ts +0 -0
  122. /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/ValueAxis.d.ts +0 -0
  123. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/multiGridObservables.d.ts +0 -0
  124. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiBars.d.ts +0 -0
  125. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiBarsTriangle.d.ts +0 -0
  126. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiDots.d.ts +0 -0
  127. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiGridLegend.d.ts +0 -0
  128. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiGridTooltip.d.ts +0 -0
  129. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiGroupAxis.d.ts +0 -0
  130. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiLineAreas.d.ts +0 -0
  131. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiLines.d.ts +0 -0
  132. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiStackedValueAxis.d.ts +0 -0
  133. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiValueAxis.d.ts +0 -0
  134. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/OverlappingStackedValueAxes.d.ts +0 -0
  135. /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/OverlappingValueAxes.d.ts +0 -0
  136. /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/MultiValueLegend.d.ts +0 -0
  137. /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/MultiValueTooltip.d.ts +0 -0
  138. /package/dist/{orbcharts-plugins-basic/src/multiValue/plugins/Ranking.d.ts → src/multiValue/plugins/OrdinalBubbles.d.ts} +0 -0
  139. /package/dist/{orbcharts-plugins-basic/src/multiValue/plugins/RankingAxis.d.ts → src/multiValue/plugins/OrdinalXAxis.d.ts} +0 -0
  140. /package/dist/{orbcharts-plugins-basic/src/noneData/plugins/Container.d.ts → src/multiValue/plugins/RacingCounterAxis.d.ts} +0 -0
  141. /package/dist/{orbcharts-plugins-basic/src/noneData/plugins/Tooltip.d.ts → src/multiValue/plugins/RankingAxis_legacy.d.ts} +0 -0
  142. /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/Scatter.d.ts +0 -0
  143. /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/ScatterBubbles.d.ts +0 -0
  144. /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/XYAux.d.ts +0 -0
  145. /package/dist/{orbcharts-plugins-basic/src/multiValue/plugins/XYAxes.d.ts → src/multiValue/plugins/XYAxes_legacy.d.ts} +0 -0
  146. /package/dist/{orbcharts-plugins-basic/src → src}/noneData/defaults.d.ts +0 -0
  147. /package/dist/{orbcharts-plugins-basic/src → src}/noneData/index.d.ts +0 -0
  148. /package/dist/{orbcharts-plugins-basic/src/series/plugins/Waffle.d.ts → src/noneData/plugins/Container.d.ts} +0 -0
  149. /package/{src/multiValue/plugins/Ranking.ts → dist/src/noneData/plugins/Tooltip.d.ts} +0 -0
  150. /package/dist/{orbcharts-plugins-basic/src → src}/relationship/defaults.d.ts +0 -0
  151. /package/dist/{orbcharts-plugins-basic/src → src}/relationship/index.d.ts +0 -0
  152. /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/ForceDirected.d.ts +0 -0
  153. /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/ForceDirectedBubbles.d.ts +0 -0
  154. /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/RelationshipLegend.d.ts +0 -0
  155. /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/RelationshipTooltip.d.ts +0 -0
  156. /package/dist/{orbcharts-plugins-basic/src → src}/relationship/relationshipObservables.d.ts +0 -0
  157. /package/dist/{orbcharts-plugins-basic/src → src}/series/defaults.d.ts +0 -0
  158. /package/dist/{orbcharts-plugins-basic/src → src}/series/index.d.ts +0 -0
  159. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/Bubbles.d.ts +0 -0
  160. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/Pie.d.ts +0 -0
  161. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/PieEventTexts.d.ts +0 -0
  162. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/PieLabels.d.ts +0 -0
  163. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/Rose.d.ts +0 -0
  164. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/RoseLabels.d.ts +0 -0
  165. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/SeriesLegend.d.ts +0 -0
  166. /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/SeriesTooltip.d.ts +0 -0
  167. /package/{src/multiValue/plugins/RankingAxis.ts → dist/src/series/plugins/Waffle.d.ts} +0 -0
  168. /package/dist/{orbcharts-plugins-basic/src → src}/series/seriesObservables.d.ts +0 -0
  169. /package/dist/{orbcharts-plugins-basic/src → src}/series/seriesUtils.d.ts +0 -0
  170. /package/dist/{orbcharts-plugins-basic/src → src}/tree/defaults.d.ts +0 -0
  171. /package/dist/{orbcharts-plugins-basic/src → src}/tree/index.d.ts +0 -0
  172. /package/dist/{orbcharts-plugins-basic/src → src}/tree/plugins/TreeLegend.d.ts +0 -0
  173. /package/dist/{orbcharts-plugins-basic/src → src}/tree/plugins/TreeMap.d.ts +0 -0
  174. /package/dist/{orbcharts-plugins-basic/src → src}/tree/plugins/TreeTooltip.d.ts +0 -0
  175. /package/dist/{orbcharts-plugins-basic/src → src}/utils/commonUtils.d.ts +0 -0
  176. /package/dist/{orbcharts-plugins-basic/src → src}/utils/d3Graphics.d.ts +0 -0
  177. /package/dist/{orbcharts-plugins-basic/src → src}/utils/d3Utils.d.ts +0 -0
  178. /package/dist/{orbcharts-plugins-basic/src → src}/utils/observables.d.ts +0 -0
  179. /package/dist/{orbcharts-plugins-basic/src → src}/utils/orbchartsUtils.d.ts +0 -0
  180. /package/dist/{orbcharts-plugins-basic/vite.config.d.ts → vite.config.d.ts} +0 -0
@@ -17,7 +17,7 @@ import { DEFAULT_X_Y_ZOOM_PARAMS } from '../defaults'
17
17
  import { getClassName, getUniID } from '../../utils/orbchartsUtils'
18
18
  import { LAYER_INDEX_OF_ROOT } from '../../const'
19
19
 
20
- const pluginName = 'XYZoom'
20
+ const pluginName = 'XZoom'
21
21
  const rectClassName = getClassName(pluginName, 'rect')
22
22
 
23
23
  const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_X_Y_ZOOM_PARAMS> = {
@@ -33,7 +33,7 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_X_Y_ZOO
33
33
  }
34
34
  }
35
35
 
36
- export const XYZoom = defineMultiValuePlugin(pluginConfig)(({ selection, rootSelection, name, observer, subject }) => {
36
+ export const XZoom = defineMultiValuePlugin(pluginConfig)(({ selection, rootSelection, name, observer, subject }) => {
37
37
 
38
38
  const destroy$ = new Subject()
39
39
 
@@ -119,15 +119,15 @@ export const XYZoom = defineMultiValuePlugin(pluginConfig)(({ selection, rootSel
119
119
  combineLatest({
120
120
  initXAxis: initXAxis$,
121
121
  layout: observer.layout$,
122
- minMaxXY: observer.minMaxXY$
122
+ xyMinMax: observer.xyMinMax$
123
123
  }).pipe(
124
124
  takeUntil(destroy$),
125
125
  switchMap(async (d) => d),
126
126
  ).subscribe(data => {
127
127
 
128
128
  const xScale: d3.ScaleLinear<number, number> = createValueToAxisScale({
129
- maxValue: data.minMaxXY.maxX,
130
- minValue: data.minMaxXY.minX,
129
+ maxValue: data.xyMinMax.maxX,
130
+ minValue: data.xyMinMax.minX,
131
131
  axisWidth: data.layout.width,
132
132
  scaleDomain: data.initXAxis.scaleDomain,
133
133
  scaleRange: data.initXAxis.scaleRange,
@@ -141,15 +141,15 @@ export const XYZoom = defineMultiValuePlugin(pluginConfig)(({ selection, rootSel
141
141
  combineLatest({
142
142
  initYAxis: initYAxis$,
143
143
  layout: observer.layout$,
144
- minMaxXY: observer.minMaxXY$
144
+ xyMinMax: observer.xyMinMax$
145
145
  }).pipe(
146
146
  takeUntil(destroy$),
147
147
  switchMap(async (d) => d),
148
148
  ).subscribe(data => {
149
149
 
150
150
  const yScale: d3.ScaleLinear<number, number> = createValueToAxisScale({
151
- maxValue: data.minMaxXY.maxY,
152
- minValue: data.minMaxXY.minY,
151
+ maxValue: data.xyMinMax.maxY,
152
+ minValue: data.xyMinMax.minY,
153
153
  axisWidth: data.layout.height,
154
154
  scaleDomain: data.initYAxis.scaleDomain,
155
155
  scaleRange: data.initYAxis.scaleRange,
@@ -163,15 +163,15 @@ export const XYZoom = defineMultiValuePlugin(pluginConfig)(({ selection, rootSel
163
163
  const minMaxScaleDomain$ = combineLatest({
164
164
  initXAxis: initXAxis$,
165
165
  initYAxis: initYAxis$,
166
- minMaxXY: observer.minMaxXY$
166
+ xyMinMax: observer.xyMinMax$
167
167
  }).pipe(
168
168
  takeUntil(destroy$),
169
169
  switchMap(async (d) => d),
170
170
  map(data => {
171
- let minX = data.minMaxXY.minX
172
- let maxX = data.minMaxXY.maxX
173
- let minY = data.minMaxXY.minY
174
- let maxY = data.minMaxXY.maxY
171
+ let minX = data.xyMinMax.minX
172
+ let maxX = data.xyMinMax.maxX
173
+ let minY = data.xyMinMax.minY
174
+ let maxY = data.xyMinMax.maxY
175
175
 
176
176
  // 原始設定為auto時要額外判斷
177
177
  if (data.initXAxis.scaleDomain[0] === 'auto' && minX > 0) {
@@ -202,7 +202,7 @@ export const XYZoom = defineMultiValuePlugin(pluginConfig)(({ selection, rootSel
202
202
  // fullDataFormatter: fullDataFormatter$.pipe(first()), // 只用第一次資料來計算scale才不會造成每次變動都受到影響
203
203
  fullDataFormatter: observer.fullDataFormatter$,
204
204
  // groupMax: groupMax$,
205
- // minMaxXY: observer.minMaxXY$,
205
+ // xyMinMax: observer.xyMinMax$,
206
206
  minMaxScaleDomain: minMaxScaleDomain$,
207
207
  // layout: observer.layout$,
208
208
  // axisSize: observer.gridAxesSize$
@@ -29,17 +29,9 @@ export const DEFAULT_BUBBLES_PARAMS: BubblesParams = {
29
29
  }
30
30
 
31
31
  export const DEFAULT_PIE_PARAMS: PieParams = {
32
- // padding: {
33
- // top: 50,
34
- // right: 70,
35
- // bottom: 50,
36
- // left: 70
37
- // },
38
32
  outerRadius: 0.85,
39
33
  innerRadius: 0,
40
34
  outerRadiusWhileHighlight: 0.9,
41
- // label?: LabelStyle
42
- // enterDuration: 800,
43
35
  startAngle: 0,
44
36
  endAngle: Math.PI * 2,
45
37
  padAngle: 0,
@@ -47,9 +39,6 @@ export const DEFAULT_PIE_PARAMS: PieParams = {
47
39
  strokeWidth: 1,
48
40
  // padRadius: 100,
49
41
  cornerRadius: 0,
50
- // highlightTarget: 'datum',
51
- // highlightId: null,
52
- // highlightLabel: null,
53
42
  }
54
43
 
55
44
  export const DEFAULT_PIE_EVENT_TEXTS_PARAMS: PieEventTextsParams = {
@@ -119,7 +108,7 @@ export const DEFAULT_PIE_LABELS_PARAMS: PieLabelsParams = {
119
108
  DEFAULT_PIE_LABELS_PARAMS.labelFn.toString = () => `d => String(d.label)`
120
109
 
121
110
  export const DEFAULT_ROSE_PARAMS: RoseParams = {
122
- outerRadius: 0.85,
111
+ outerRadius: 0.95,
123
112
  padAngle: 0,
124
113
  strokeColorType: 'background',
125
114
  strokeWidth: 0.5,
@@ -129,7 +118,7 @@ export const DEFAULT_ROSE_PARAMS: RoseParams = {
129
118
  }
130
119
 
131
120
  export const DEFAULT_ROSE_LABELS_PARAMS: RoseLabelsParams = {
132
- outerRadius: 0.85,
121
+ outerRadius: 0.95,
133
122
  labelCentroid: 2.1,
134
123
  labelFn: d => String(d.label),
135
124
  labelColorType: 'primary',
@@ -5,6 +5,7 @@ import {
5
5
  switchMap,
6
6
  first,
7
7
  takeUntil,
8
+ debounceTime,
8
9
  Subject,
9
10
  Observable,
10
11
  distinctUntilChanged,
@@ -95,9 +96,10 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_BUBBLES
95
96
  }
96
97
  }
97
98
 
98
- let force: d3.Simulation<d3.SimulationNodeDatum, undefined> | undefined
99
99
 
100
- function makeForce (bubblesSelection: d3.Selection<SVGGElement, BubblesDatum, any, any>, fullParams: BubblesParams) {
100
+ // let isRunning = false
101
+
102
+ function createSimulation (bubblesSelection: d3.Selection<SVGGElement, BubblesDatum, any, any>, fullParams: BubblesParams) {
101
103
  return d3.forceSimulation()
102
104
  .velocityDecay(fullParams.force!.velocityDecay!)
103
105
  // .alphaDecay(0.2)
@@ -126,7 +128,12 @@ function makeForce (bubblesSelection: d3.Selection<SVGGElement, BubblesDatum, an
126
128
  })
127
129
  // .attr("cx", (d) => d.x)
128
130
  // .attr("cy", (d) => d.y)
131
+
132
+
129
133
  })
134
+ // .on("end", () => {
135
+
136
+ // })
130
137
 
131
138
  }
132
139
 
@@ -149,8 +156,8 @@ function makeForce (bubblesSelection: d3.Selection<SVGGElement, BubblesDatum, an
149
156
  // return maxR * modifier
150
157
  // }
151
158
 
152
- function createBubblesData ({ visibleComputedLayoutData, LastBubbleDataMap, graphicWidth, graphicHeight, SeriesContainerPositionMap, scaleType }: {
153
- visibleComputedLayoutData: ComputedDataSeries
159
+ function createBubblesData ({ visibleComputedSortedData, LastBubbleDataMap, graphicWidth, graphicHeight, SeriesContainerPositionMap, scaleType }: {
160
+ visibleComputedSortedData: ComputedDataSeries
154
161
  LastBubbleDataMap: Map<string, BubblesDatum>
155
162
  graphicWidth: number
156
163
  graphicHeight: number
@@ -161,7 +168,7 @@ function createBubblesData ({ visibleComputedLayoutData, LastBubbleDataMap, grap
161
168
  // 虛擬大圓(所有小圓聚合起來的大圓)的半徑
162
169
  const totalR = Math.min(...[graphicWidth, graphicHeight]) / 2
163
170
 
164
- const data = visibleComputedLayoutData.flat()
171
+ const data = visibleComputedSortedData.flat()
165
172
 
166
173
  const totalValue = data.reduce((acc, current) => acc + current.value, 0)
167
174
 
@@ -311,18 +318,18 @@ function setHighlightData ({ data, highlightRIncrease, highlightIds }: {
311
318
  })
312
319
  }
313
320
 
314
- function drag (): d3.DragBehavior<Element, unknown, unknown> {
321
+ function drag (_simulation: d3.Simulation<d3.SimulationNodeDatum, undefined>): d3.DragBehavior<Element, unknown, unknown> {
315
322
  return d3.drag()
316
323
  .on("start", (event, d: any) => {
317
324
  if (!event.active) {
318
- force!.alpha(1).restart()
325
+ _simulation!.alpha(1).restart()
319
326
  }
320
327
  d.fx = d.x
321
328
  d.fy = d.y
322
329
  })
323
330
  .on("drag", (event, d: any) => {
324
331
  if (!event.active) {
325
- force!.alphaTarget(0)
332
+ _simulation!.alphaTarget(0)
326
333
  }
327
334
  d.fx = event.x
328
335
  d.fy = event.y
@@ -330,6 +337,7 @@ function drag (): d3.DragBehavior<Element, unknown, unknown> {
330
337
  .on("end", (event, d: any) => {
331
338
  d.fx = null
332
339
  d.fy = null
340
+ _simulation!.alpha(1).restart()
333
341
  })
334
342
  }
335
343
 
@@ -341,14 +349,15 @@ function drag (): d3.DragBehavior<Element, unknown, unknown> {
341
349
  // return typeCenter ? typeCenter.x : 0
342
350
  // }
343
351
 
344
- function groupBubbles ({ fullParams, SeriesContainerPositionMap }: {
352
+ function groupBubbles ({ _simulation, fullParams, SeriesContainerPositionMap }: {
353
+ _simulation: d3.Simulation<d3.SimulationNodeDatum, undefined>
345
354
  fullParams: BubblesParams
346
355
  // graphicWidth: number
347
356
  // graphicHeight: number
348
357
  SeriesContainerPositionMap: Map<string, ContainerPosition>
349
358
  }) {
350
359
  // console.log('groupBubbles')
351
- force!
360
+ _simulation!
352
361
  // .force('x', d3.forceX().strength(fullParams.force.strength).x(graphicWidth / 2))
353
362
  // .force('y', d3.forceY().strength(fullParams.force.strength).y(graphicHeight / 2))
354
363
  .force('x', d3.forceX().strength(fullParams.force.strength).x((data: BubblesSimulationDatum) => {
@@ -358,7 +367,7 @@ function groupBubbles ({ fullParams, SeriesContainerPositionMap }: {
358
367
  return SeriesContainerPositionMap.get(data.seriesLabel)!.centerY
359
368
  }))
360
369
 
361
- force!.alpha(1).restart()
370
+ // force!.alpha(1).restart()
362
371
  }
363
372
 
364
373
  function highlight ({ bubblesSelection, highlightIds, fullChartParams }: {
@@ -397,6 +406,8 @@ export const Bubbles = defineSeriesPlugin(pluginConfig)(({ selection, name, obse
397
406
 
398
407
  const destroy$ = new Subject()
399
408
 
409
+ let simulation: d3.Simulation<d3.SimulationNodeDatum, undefined> | undefined
410
+
400
411
  // 紀錄前一次bubble data
401
412
  let LastBubbleDataMap: Map<string, BubblesDatum> = new Map()
402
413
 
@@ -415,15 +426,15 @@ export const Bubbles = defineSeriesPlugin(pluginConfig)(({ selection, name, obse
415
426
  const bubblesData$ = combineLatest({
416
427
  layout: observer.layout$,
417
428
  SeriesContainerPositionMap: observer.SeriesContainerPositionMap$,
418
- visibleComputedLayoutData: observer.visibleComputedLayoutData$,
429
+ visibleComputedSortedData: observer.visibleComputedSortedData$,
419
430
  scaleType: scaleType$
420
431
  }).pipe(
421
432
  takeUntil(destroy$),
422
433
  switchMap(async (d) => d),
423
434
  map(data => {
424
- // console.log(data.visibleComputedLayoutData)
435
+ // console.log(data.visibleComputedSortedData)
425
436
  return createBubblesData({
426
- visibleComputedLayoutData: data.visibleComputedLayoutData,
437
+ visibleComputedSortedData: data.visibleComputedSortedData,
427
438
  LastBubbleDataMap,
428
439
  graphicWidth: data.layout.width,
429
440
  graphicHeight: data.layout.height,
@@ -455,8 +466,9 @@ export const Bubbles = defineSeriesPlugin(pluginConfig)(({ selection, name, obse
455
466
  takeUntil(destroy$),
456
467
  switchMap(async (d) => d),
457
468
  map(data => {
458
- if (force) {
459
- force.stop()
469
+ if (simulation) {
470
+ // 先停止,重新計算之後再restart
471
+ simulation.stop()
460
472
  }
461
473
 
462
474
  const bubblesSelection = renderBubbles({
@@ -467,24 +479,23 @@ export const Bubbles = defineSeriesPlugin(pluginConfig)(({ selection, name, obse
467
479
  sumSeries: data.sumSeries
468
480
  })
469
481
 
470
- force = makeForce(bubblesSelection, data.fullParams)
482
+ simulation = createSimulation(bubblesSelection, data.fullParams)
471
483
 
472
- force.nodes(data.bubblesData)
484
+ simulation.nodes(data.bubblesData)
473
485
 
474
486
  groupBubbles({
487
+ _simulation: simulation,
475
488
  fullParams: data.fullParams,
476
489
  SeriesContainerPositionMap: data.SeriesContainerPositionMap
477
490
  // graphicWidth: data.layout.width,
478
491
  // graphicHeight: data.layout.height
479
492
  })
480
493
 
481
- // setTimeout(() => {
482
- // force!.alphaTarget(0)
483
- // force!.alpha(1).restart()
484
- // }, 2000)
494
+ simulation!.alpha(1).restart()
485
495
 
486
496
  return bubblesSelection
487
- })
497
+ }),
498
+ shareReplay(1)
488
499
  )
489
500
 
490
501
  combineLatest({
@@ -568,22 +579,22 @@ export const Bubbles = defineSeriesPlugin(pluginConfig)(({ selection, name, obse
568
579
  data: data.computedData
569
580
  })
570
581
  })
571
- .call(drag() as any)
582
+ .call(drag(simulation) as any)
572
583
 
573
584
 
574
585
  })
575
586
 
576
587
  combineLatest({
577
588
  bubblesSelection: bubblesSelection$,
578
- bubblesData: bubblesData$,
589
+ // bubblesData: bubblesData$,
579
590
  highlight: observer.seriesHighlight$.pipe(
580
591
  map(data => data.map(d => d.id))
581
592
  ),
582
593
  fullChartParams: observer.fullChartParams$,
583
- fullParams: observer.fullParams$,
584
- sumSeries: sumSeries$,
585
- // layout: observer.layout$,
586
- SeriesContainerPositionMap: observer.SeriesContainerPositionMap$,
594
+ // fullParams: observer.fullParams$,
595
+ // sumSeries: sumSeries$,
596
+ // // layout: observer.layout$,
597
+ // SeriesContainerPositionMap: observer.SeriesContainerPositionMap$,
587
598
  }).pipe(
588
599
  takeUntil(destroy$),
589
600
  switchMap(async d => d)
@@ -614,8 +625,13 @@ export const Bubbles = defineSeriesPlugin(pluginConfig)(({ selection, name, obse
614
625
  // }
615
626
 
616
627
  })
628
+
617
629
 
618
630
  return () => {
619
631
  destroy$.next(undefined)
632
+ if (simulation) {
633
+ simulation.stop()
634
+ simulation = undefined
635
+ }
620
636
  }
621
637
  })
@@ -205,7 +205,7 @@ function highlight ({ pathSelection, ids, fullChartParams, arc, arcHighlight }:
205
205
  function createEachPie (pluginName: string, context: {
206
206
  containerSelection: d3.Selection<SVGGElement, any, any, unknown>
207
207
  computedData$: Observable<ComputedDatumSeries[][]>
208
- containerVisibleComputedLayoutData$: Observable<ComputedDatumSeries[]>
208
+ containerVisibleComputedSortedData$: Observable<ComputedDatumSeries[]>
209
209
  SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>
210
210
  fullParams$: Observable<PieParams>
211
211
  fullChartParams$: Observable<ChartParams>
@@ -248,7 +248,7 @@ function createEachPie (pluginName: string, context: {
248
248
 
249
249
  const pieData$: Observable<PieDatum[]> = new Observable(subscriber => {
250
250
  combineLatest({
251
- containerVisibleComputedLayoutData: context.containerVisibleComputedLayoutData$,
251
+ containerVisibleComputedSortedData: context.containerVisibleComputedSortedData$,
252
252
  fullParams: context.fullParams$,
253
253
  }).pipe(
254
254
  takeUntil(destroy$),
@@ -256,7 +256,7 @@ function createEachPie (pluginName: string, context: {
256
256
  ).subscribe(data => {
257
257
  // console.log('pieData', data)
258
258
  const pieData: PieDatum[] = makePieData({
259
- data: data.containerVisibleComputedLayoutData,
259
+ data: data.containerVisibleComputedSortedData,
260
260
  startAngle: data.fullParams.startAngle,
261
261
  endAngle: data.fullParams.endAngle
262
262
  })
@@ -592,7 +592,7 @@ export const Pie = defineSeriesPlugin(pluginConfig)(({ selection, name, subject,
592
592
  // console.log('containerIndex', containerIndex)
593
593
  const containerSelection = d3.select(g[containerIndex])
594
594
 
595
- const containerVisibleComputedLayoutData$ = observer.visibleComputedLayoutData$.pipe(
595
+ const containerVisibleComputedSortedData$ = observer.visibleComputedSortedData$.pipe(
596
596
  takeUntil(destroy$),
597
597
  map(data => data[containerIndex] ?? data[0])
598
598
  )
@@ -605,7 +605,7 @@ export const Pie = defineSeriesPlugin(pluginConfig)(({ selection, name, subject,
605
605
  unsubscribeFnArr[containerIndex] = createEachPie(pluginName, {
606
606
  containerSelection: containerSelection,
607
607
  computedData$: observer.computedData$,
608
- containerVisibleComputedLayoutData$: containerVisibleComputedLayoutData$,
608
+ containerVisibleComputedSortedData$: containerVisibleComputedSortedData$,
609
609
  SeriesDataMap$: observer.SeriesDataMap$,
610
610
  fullParams$: observer.fullParams$,
611
611
  fullChartParams$: observer.fullChartParams$,
@@ -105,7 +105,7 @@ function createTextData ({ eventData, renderFn, textAttrs, textStyles }: {
105
105
  function createEachPieEventTexts (pluginName: string, context: {
106
106
  containerSelection: d3.Selection<SVGGElement, any, any, unknown>
107
107
  computedData$: Observable<ComputedDatumSeries[][]>
108
- containerComputedLayoutData$: Observable<ComputedDatumSeries[]>
108
+ containerComputedSortedData$: Observable<ComputedDatumSeries[]>
109
109
  SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>
110
110
  fullParams$: Observable<PieEventTextsParams>
111
111
  fullChartParams$: Observable<ChartParams>
@@ -252,7 +252,7 @@ export const PieEventTexts = defineSeriesPlugin(pluginConfig)(({ selection, name
252
252
 
253
253
  const containerSelection = d3.select(g[containerIndex])
254
254
 
255
- const containerComputedLayoutData$ = observer.computedLayoutData$.pipe(
255
+ const containerComputedSortedData$ = observer.computedSortedData$.pipe(
256
256
  takeUntil(destroy$),
257
257
  map(data => data[containerIndex] ?? data[0])
258
258
  )
@@ -265,7 +265,7 @@ export const PieEventTexts = defineSeriesPlugin(pluginConfig)(({ selection, name
265
265
  unsubscribeFnArr[containerIndex] = createEachPieEventTexts(pluginName, {
266
266
  containerSelection: containerSelection,
267
267
  computedData$: observer.computedData$,
268
- containerComputedLayoutData$: containerComputedLayoutData$,
268
+ containerComputedSortedData$: containerComputedSortedData$,
269
269
  SeriesDataMap$: observer.SeriesDataMap$,
270
270
  fullParams$: observer.fullParams$,
271
271
  fullChartParams$: observer.fullChartParams$,
@@ -447,7 +447,7 @@ function highlight ({ textSelection, lineSelection, ids, fullChartParams }: {
447
447
  function createEachPieLabel (pluginName: string, context: {
448
448
  containerSelection: d3.Selection<SVGGElement, any, any, unknown>
449
449
  // computedData$: Observable<ComputedDatumSeries[][]>
450
- containerVisibleComputedLayoutData$: Observable<ComputedDatumSeries[]>
450
+ containerVisibleComputedSortedData$: Observable<ComputedDatumSeries[]>
451
451
  // SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>
452
452
  fullParams$: Observable<PieLabelsParams>
453
453
  fullChartParams$: Observable<ChartParams>
@@ -488,7 +488,7 @@ function createEachPieLabel (pluginName: string, context: {
488
488
 
489
489
  combineLatest({
490
490
  shorterSideWith: shorterSideWith$,
491
- containerVisibleComputedLayoutData: context.containerVisibleComputedLayoutData$,
491
+ containerVisibleComputedSortedData: context.containerVisibleComputedSortedData$,
492
492
  fullParams: context.fullParams$,
493
493
  fullChartParams: context.fullChartParams$,
494
494
  textSizePx: context.textSizePx$,
@@ -516,7 +516,7 @@ function createEachPieLabel (pluginName: string, context: {
516
516
  })
517
517
 
518
518
  const pieData = makePieData({
519
- data: data.containerVisibleComputedLayoutData,
519
+ data: data.containerVisibleComputedSortedData,
520
520
  startAngle: data.fullParams.startAngle,
521
521
  endAngle: data.fullParams.endAngle
522
522
  })
@@ -608,7 +608,7 @@ export const PieLabels = defineSeriesPlugin(pluginConfig)(({ selection, observer
608
608
 
609
609
  const containerSelection = d3.select(g[containerIndex])
610
610
 
611
- const containerVisibleComputedLayoutData$ = observer.visibleComputedLayoutData$.pipe(
611
+ const containerVisibleComputedSortedData$ = observer.visibleComputedSortedData$.pipe(
612
612
  takeUntil(destroy$),
613
613
  map(data => data[containerIndex] ?? data[0])
614
614
  )
@@ -621,7 +621,7 @@ export const PieLabels = defineSeriesPlugin(pluginConfig)(({ selection, observer
621
621
  unsubscribeFnArr[containerIndex] = createEachPieLabel(pluginName, {
622
622
  containerSelection: containerSelection,
623
623
  // computedData$: observer.computedData$,
624
- containerVisibleComputedLayoutData$: containerVisibleComputedLayoutData$,
624
+ containerVisibleComputedSortedData$: containerVisibleComputedSortedData$,
625
625
  // SeriesDataMap$: observer.SeriesDataMap$,
626
626
  fullParams$: observer.fullParams$,
627
627
  fullChartParams$: observer.fullChartParams$,
@@ -213,8 +213,8 @@ function createEachRose (pluginName: string, context: {
213
213
  containerSelection: d3.Selection<SVGGElement, any, any, unknown>
214
214
  computedData$: Observable<ComputedDatumSeries[][]>
215
215
  visibleComputedData$: Observable<ComputedDatumSeries[][]>
216
- visibleComputedLayoutData$: Observable<ComputedDatumSeries[][]>
217
- containerVisibleComputedLayoutData$: Observable<ComputedDatumSeries[]>
216
+ visibleComputedSortedData$: Observable<ComputedDatumSeries[][]>
217
+ containerVisibleComputedSortedData$: Observable<ComputedDatumSeries[]>
218
218
  SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>
219
219
  fullParams$: Observable<RoseParams>
220
220
  fullChartParams$: Observable<ChartParams>
@@ -235,14 +235,14 @@ function createEachRose (pluginName: string, context: {
235
235
  )
236
236
 
237
237
  const pieData$: Observable<PieDatum[]> = combineLatest({
238
- containerVisibleComputedLayoutData: context.containerVisibleComputedLayoutData$,
238
+ containerVisibleComputedSortedData: context.containerVisibleComputedSortedData$,
239
239
  fullParams: context.fullParams$,
240
240
  }).pipe(
241
241
  takeUntil(destroy$),
242
242
  switchMap(async (d) => d),
243
243
  map(data => {
244
- const eachAngle = roseEndAngle / data.containerVisibleComputedLayoutData.length
245
- return data.containerVisibleComputedLayoutData.map((d, i) => {
244
+ const eachAngle = roseEndAngle / data.containerVisibleComputedSortedData.length
245
+ return data.containerVisibleComputedSortedData.map((d, i) => {
246
246
  return {
247
247
  id: d.id,
248
248
  data: d,
@@ -263,13 +263,13 @@ function createEachRose (pluginName: string, context: {
263
263
  distinctUntilChanged()
264
264
  )
265
265
 
266
- const maxValue$ = context.visibleComputedLayoutData$.pipe(
266
+ const maxValue$ = context.visibleComputedSortedData$.pipe(
267
267
  map(data => Math.max(...data.flat().map(d => d.value))),
268
268
  distinctUntilChanged()
269
269
  )
270
270
 
271
- // context.visibleComputedLayoutData$.subscribe(data => {
272
- // console.log('visibleComputedLayoutData$', data)
271
+ // context.visibleComputedSortedData$.subscribe(data => {
272
+ // console.log('visibleComputedSortedData$', data)
273
273
  // })
274
274
 
275
275
  const tweenArc$ = combineLatest({
@@ -483,7 +483,7 @@ export const Rose = defineSeriesPlugin(pluginConfig)(({ selection, name, subject
483
483
  seriesCenterSelection.each((d, containerIndex, g) => {
484
484
  const containerSelection = d3.select(g[containerIndex])
485
485
 
486
- const containerVisibleComputedLayoutData$ = observer.visibleComputedLayoutData$.pipe(
486
+ const containerVisibleComputedSortedData$ = observer.visibleComputedSortedData$.pipe(
487
487
  takeUntil(destroy$),
488
488
  map(data => JSON.parse(JSON.stringify(data[containerIndex] ?? data[0])))
489
489
  )
@@ -497,8 +497,8 @@ export const Rose = defineSeriesPlugin(pluginConfig)(({ selection, name, subject
497
497
  containerSelection: containerSelection,
498
498
  computedData$: observer.computedData$,
499
499
  visibleComputedData$: observer.visibleComputedData$,
500
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
501
- containerVisibleComputedLayoutData$: containerVisibleComputedLayoutData$,
500
+ visibleComputedSortedData$: observer.visibleComputedSortedData$,
501
+ containerVisibleComputedSortedData$: containerVisibleComputedSortedData$,
502
502
  SeriesDataMap$: observer.SeriesDataMap$,
503
503
  fullParams$: observer.fullParams$,
504
504
  fullChartParams$: observer.fullChartParams$,
@@ -406,8 +406,8 @@ function highlight ({ textSelection, lineSelection, ids, fullChartParams }: {
406
406
  function createEachPieLabel (pluginName: string, context: {
407
407
  containerSelection: d3.Selection<SVGGElement, any, any, unknown>
408
408
  // computedData$: Observable<ComputedDatumSeries[][]>
409
- visibleComputedLayoutData$: Observable<ComputedDatumSeries[][]>
410
- containerVisibleComputedLayoutData$: Observable<ComputedDatumSeries[]>
409
+ visibleComputedSortedData$: Observable<ComputedDatumSeries[][]>
410
+ containerVisibleComputedSortedData$: Observable<ComputedDatumSeries[]>
411
411
  // SeriesDataMap$: Observable<Map<string, ComputedDatumSeries[]>>
412
412
  fullParams$: Observable<RoseLabelsParams>
413
413
  fullChartParams$: Observable<ChartParams>
@@ -435,7 +435,7 @@ function createEachPieLabel (pluginName: string, context: {
435
435
  distinctUntilChanged()
436
436
  )
437
437
 
438
- const maxValue$ = context.visibleComputedLayoutData$.pipe(
438
+ const maxValue$ = context.visibleComputedSortedData$.pipe(
439
439
  map(data => Math.max(...data.flat().map(d => d.value))),
440
440
  distinctUntilChanged()
441
441
  )
@@ -453,7 +453,7 @@ function createEachPieLabel (pluginName: string, context: {
453
453
  combineLatest({
454
454
  // layout: context.seriesContainerPosition$,
455
455
  shorterSideWith: shorterSideWith$,
456
- containerVisibleComputedLayoutData: context.containerVisibleComputedLayoutData$,
456
+ containerVisibleComputedSortedData: context.containerVisibleComputedSortedData$,
457
457
  maxValue: maxValue$,
458
458
  fullParams: context.fullParams$,
459
459
  fullChartParams: context.fullChartParams$,
@@ -464,9 +464,9 @@ function createEachPieLabel (pluginName: string, context: {
464
464
  switchMap(async (d) => d),
465
465
  ).subscribe(data => {
466
466
 
467
- const eachAngle = Math.PI * 2 / data.containerVisibleComputedLayoutData.length
467
+ const eachAngle = Math.PI * 2 / data.containerVisibleComputedSortedData.length
468
468
 
469
- const pieData = data.containerVisibleComputedLayoutData.map((d, i) => {
469
+ const pieData = data.containerVisibleComputedSortedData.map((d, i) => {
470
470
  return {
471
471
  id: d.id,
472
472
  data: d,
@@ -567,7 +567,7 @@ export const RoseLabels = defineSeriesPlugin(pluginConfig)(({ selection, observe
567
567
 
568
568
  const containerSelection = d3.select(g[containerIndex])
569
569
 
570
- const containerVisibleComputedLayoutData$ = observer.visibleComputedLayoutData$.pipe(
570
+ const containerVisibleComputedSortedData$ = observer.visibleComputedSortedData$.pipe(
571
571
  takeUntil(destroy$),
572
572
  map(data => JSON.parse(JSON.stringify(data[containerIndex] ?? data[0])))
573
573
  )
@@ -580,8 +580,8 @@ export const RoseLabels = defineSeriesPlugin(pluginConfig)(({ selection, observe
580
580
  unsubscribeFnArr[containerIndex] = createEachPieLabel(pluginName, {
581
581
  containerSelection: containerSelection,
582
582
  // computedData$: observer.computedData$,
583
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
584
- containerVisibleComputedLayoutData$: containerVisibleComputedLayoutData$,
583
+ visibleComputedSortedData$: observer.visibleComputedSortedData$,
584
+ containerVisibleComputedSortedData$: containerVisibleComputedSortedData$,
585
585
  // SeriesDataMap$: observer.SeriesDataMap$,
586
586
  fullParams$: observer.fullParams$,
587
587
  fullChartParams$: observer.fullChartParams$,
@@ -1 +0,0 @@
1
- export declare const GridZoom: import('@orbcharts/core-types/dist/src/types/Plugin').PluginConstructor<"grid", "GridZoom", import('@orbcharts/plugins-basic-types').GridZoomParams>;
@@ -1 +0,0 @@
1
- export declare const StackedBar: import('@orbcharts/core-types/dist/src/types/Plugin').PluginConstructor<"grid", "StackedBar", import('@orbcharts/plugins-basic-types').StackedBarParams>;
@@ -1,7 +0,0 @@
1
- export * from './grid';
2
- export * from './multiGrid';
3
- export * from './multiValue';
4
- export * from './noneData';
5
- export * from './relationship';
6
- export * from './series';
7
- export * from './tree';
@@ -1 +0,0 @@
1
- export declare const MultiStackedBar: import('@orbcharts/core-types/dist/src/types/Plugin').PluginConstructor<"multiGrid", "MultiStackedBar", import('@orbcharts/plugins-basic-types').MultiStackedBarParams>;
@@ -1,9 +0,0 @@
1
- import { MultiValueLegendParams, MultiValueTooltipParams, ScatterParams, ScatterBubblesParams, XYAuxParams, XYAxesParams, XYZoomParams } from '../../lib/plugins-basic-types';
2
-
3
- export declare const DEFAULT_MULTI_VALUE_LEGEND_PARAMS: MultiValueLegendParams;
4
- export declare const DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS: MultiValueTooltipParams;
5
- export declare const DEFAULT_SCATTER_PARAMS: ScatterParams;
6
- export declare const DEFAULT_SCATTER_BUBBLES_PARAMS: ScatterBubblesParams;
7
- export declare const DEFAULT_X_Y_AUX_PARAMS: XYAuxParams;
8
- export declare const DEFAULT_X_Y_AXES_PARAMS: XYAxesParams;
9
- export declare const DEFAULT_X_Y_ZOOM_PARAMS: XYZoomParams;
@@ -1,33 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { DataFormatterMultiValue, ComputedLayoutDatumMultiValue, TransformData, ContainerPositionScaled, Layout } from '../../lib/core-types';
3
- import * as d3 from 'd3';
4
- export declare const multiValueSelectionsObservable: ({ selection, pluginName, clipPathID, categoryLabels$, multiValueContainerPosition$, multiValueGraphicTransform$ }: {
5
- selection: d3.Selection<any, unknown, any, unknown>;
6
- pluginName: string;
7
- clipPathID: string;
8
- categoryLabels$: Observable<string[]>;
9
- multiValueContainerPosition$: Observable<ContainerPositionScaled[]>;
10
- multiValueGraphicTransform$: Observable<TransformData>;
11
- }) => {
12
- categorySelection$: Observable<d3.Selection<SVGGElement, string, any, unknown>>;
13
- axesSelection$: Observable<d3.Selection<SVGGElement, string, any, unknown>>;
14
- defsSelection$: Observable<d3.Selection<SVGDefsElement, string, any, unknown>>;
15
- graphicGSelection$: Observable<d3.Selection<SVGGElement, string, any, unknown>>;
16
- };
17
- export declare const multiValueXYPositionObservable: ({ rootSelection, fullDataFormatter$, filteredMinMaxXYData$, multiValueContainerPosition$, layout$ }: {
18
- rootSelection: d3.Selection<any, unknown, any, unknown>;
19
- fullDataFormatter$: Observable<DataFormatterMultiValue>;
20
- filteredMinMaxXYData$: Observable<{
21
- minXDatum: ComputedLayoutDatumMultiValue;
22
- maxXDatum: ComputedLayoutDatumMultiValue;
23
- minYDatum: ComputedLayoutDatumMultiValue;
24
- maxYDatum: ComputedLayoutDatumMultiValue;
25
- }>;
26
- multiValueContainerPosition$: Observable<ContainerPositionScaled[]>;
27
- layout$: Observable<Layout>;
28
- }) => Observable<{
29
- x: number;
30
- y: number;
31
- xValue: number;
32
- yValue: number;
33
- }>;
@@ -1 +0,0 @@
1
- export declare const XYZoom: import('@orbcharts/core-types/dist/src/types/Plugin').PluginConstructor<"multiValue", "XYZoom", import('@orbcharts/plugins-basic-types').XYZoomParams>;