@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_GRID_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 = 'GridZoom'
20
+ const pluginName = 'GroupZoom'
21
21
  const rectClassName = getClassName(pluginName, 'rect')
22
22
 
23
23
  const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_GRID_ZOOM_PARAMS> = {
@@ -33,7 +33,7 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_GRID_ZO
33
33
  }
34
34
  }
35
35
 
36
- export const GridZoom = defineGridPlugin(pluginConfig)(({ selection, rootSelection, name, observer, subject }) => {
36
+ export const GroupZoom = defineGridPlugin(pluginConfig)(({ selection, rootSelection, name, observer, subject }) => {
37
37
 
38
38
  const destroy$ = new Subject()
39
39
 
@@ -40,8 +40,8 @@ export const LineAreas = defineGridPlugin(pluginConfig)(({ selection, name, obse
40
40
  selection,
41
41
  computedData$: observer.computedData$,
42
42
  visibleComputedData$: observer.visibleComputedData$,
43
- computedLayoutData$: observer.computedLayoutData$,
44
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
43
+ computedAxesData$: observer.computedAxesData$,
44
+ visibleComputedAxesData$: observer.visibleComputedAxesData$,
45
45
  seriesLabels$: observer.seriesLabels$,
46
46
  SeriesDataMap$: observer.SeriesDataMap$,
47
47
  GroupDataMap$: observer.GroupDataMap$,
@@ -33,9 +33,9 @@ export const Lines = defineGridPlugin(pluginConfig)(({ selection, rootSelection,
33
33
  const unsubscribeBaseBars = createBaseLines(pluginName, {
34
34
  selection,
35
35
  computedData$: observer.computedData$,
36
- computedLayoutData$: observer.computedLayoutData$,
36
+ computedAxesData$: observer.computedAxesData$,
37
37
  visibleComputedData$: observer.visibleComputedData$,
38
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
38
+ visibleComputedAxesData$: observer.visibleComputedAxesData$,
39
39
  seriesLabels$: observer.seriesLabels$,
40
40
  SeriesDataMap$: observer.SeriesDataMap$,
41
41
  GroupDataMap$: observer.GroupDataMap$,
@@ -9,9 +9,9 @@ import type { DefinePluginConfig } from '../../../lib/core-types'
9
9
  import { defineGridPlugin } from '../../../lib/core'
10
10
  import { DEFAULT_STACKED_BAR_PARAMS } from '../defaults'
11
11
  import { LAYER_INDEX_OF_GRAPHIC } from '../../const'
12
- import { createBaseStackedBar } from '../../base/BaseStackedBar'
12
+ import { createBaseStackedBars } from '../../base/BaseStackedBars'
13
13
 
14
- const pluginName = 'StackedBar'
14
+ const pluginName = 'StackedBars'
15
15
 
16
16
  const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_STACKED_BAR_PARAMS> = {
17
17
  name: pluginName,
@@ -33,15 +33,15 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_STACKED
33
33
  }
34
34
  }
35
35
 
36
- export const StackedBar = defineGridPlugin(pluginConfig)(({ selection, name, subject, observer }) => {
36
+ export const StackedBars = defineGridPlugin(pluginConfig)(({ selection, name, subject, observer }) => {
37
37
  const destroy$ = new Subject()
38
38
 
39
- const unsubscribeBaseBars = createBaseStackedBar(pluginName, {
39
+ const unsubscribeBaseBars = createBaseStackedBars(pluginName, {
40
40
  selection,
41
41
  computedData$: observer.computedData$,
42
- computedLayoutData$: observer.computedLayoutData$,
42
+ computedAxesData$: observer.computedAxesData$,
43
43
  visibleComputedData$: observer.visibleComputedData$,
44
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
44
+ visibleComputedAxesData$: observer.visibleComputedAxesData$,
45
45
  seriesLabels$: observer.seriesLabels$,
46
46
  SeriesDataMap$: observer.SeriesDataMap$,
47
47
  GroupDataMap$: observer.GroupDataMap$,
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  MultiGridLegendParams,
3
3
  MultiBarsParams,
4
- MultiStackedBarParams,
4
+ MultiStackedBarsParams,
5
5
  MultiBarsTriangleParams,
6
6
  MultiLinesParams,
7
7
  MultiLineAreasParams,
@@ -85,7 +85,7 @@ export const DEFAULT_MULTI_BARS_PARAMS: MultiBarsParams = {
85
85
  gridIndexes: [0]
86
86
  }
87
87
 
88
- export const DEFAULT_MULTI_STACKED_BAR_PARAMS: MultiStackedBarParams = {
88
+ export const DEFAULT_MULTI_STACKED_BAR_PARAMS: MultiStackedBarsParams = {
89
89
  barWidth: 0,
90
90
  barGroupPadding: 10,
91
91
  barRadius: false,
@@ -2,7 +2,7 @@ export * from './defaults'
2
2
  // export * from './types'
3
3
  export { MultiGridLegend } from './plugins/MultiGridLegend'
4
4
  export { MultiBars } from './plugins/MultiBars'
5
- export { MultiStackedBar } from './plugins/MultiStackedBar'
5
+ export { MultiStackedBars } from './plugins/MultiStackedBars'
6
6
  export { MultiBarsTriangle } from './plugins/MultiBarsTriangle'
7
7
  export { MultiLines } from './plugins/MultiLines'
8
8
  export { MultiLineAreas } from './plugins/MultiLineAreas'
@@ -34,6 +34,7 @@ export const multiGridPluginDetailObservables = (observer: ContextObserverMultiG
34
34
  multiGridEachDetail: observer.multiGridEachDetail$,
35
35
  gridIndexes: gridIndexes$,
36
36
  }).pipe(
37
+ switchMap(async d => d),
37
38
  map(data => {
38
39
  // 對應所有grid
39
40
  if (data.gridIndexes === 'all') {
@@ -82,8 +82,8 @@ export const MultiBars = defineMultiGridPlugin(pluginConfig)(({ selection, name,
82
82
  selection: gridSelection,
83
83
  computedData$: d.computedData$,
84
84
  visibleComputedData$: d.visibleComputedData$,
85
- computedLayoutData$: d.computedLayoutData$,
86
- visibleComputedLayoutData$: d.visibleComputedLayoutData$,
85
+ computedAxesData$: d.computedAxesData$,
86
+ visibleComputedAxesData$: d.visibleComputedAxesData$,
87
87
  seriesLabels$: d.seriesLabels$,
88
88
  SeriesDataMap$: d.SeriesDataMap$,
89
89
  GroupDataMap$: d.GroupDataMap$,
@@ -93,7 +93,7 @@ export const MultiBars = defineMultiGridPlugin(pluginConfig)(({ selection, name,
93
93
  gridGraphicTransform$: d.gridGraphicTransform$,
94
94
  gridGraphicReverseScale$: d.gridGraphicReverseScale$,
95
95
  gridAxesSize$: d.gridAxesSize$,
96
- gridHighlight$: d.gridHighlight$,
96
+ gridHighlight$: observer.multiGridHighlight$,
97
97
  gridContainerPosition$: d.gridContainerPosition$,
98
98
  isSeriesSeprate$,
99
99
  event$: subject.event$ as Subject<any>,
@@ -88,8 +88,8 @@ export const MultiBarsTriangle = defineMultiGridPlugin(pluginConfig)(({ selectio
88
88
  selection: gridSelection,
89
89
  computedData$: d.computedData$,
90
90
  visibleComputedData$: d.visibleComputedData$,
91
- computedLayoutData$: d.computedLayoutData$,
92
- visibleComputedLayoutData$: d.visibleComputedLayoutData$,
91
+ computedAxesData$: d.computedAxesData$,
92
+ visibleComputedAxesData$: d.visibleComputedAxesData$,
93
93
  seriesLabels$: d.seriesLabels$,
94
94
  SeriesDataMap$: d.SeriesDataMap$,
95
95
  GroupDataMap$: d.GroupDataMap$,
@@ -99,7 +99,7 @@ export const MultiBarsTriangle = defineMultiGridPlugin(pluginConfig)(({ selectio
99
99
  gridAxesTransform$: d.gridAxesTransform$,
100
100
  gridGraphicTransform$: d.gridGraphicTransform$,
101
101
  gridAxesSize$: d.gridAxesSize$,
102
- gridHighlight$: d.gridHighlight$,
102
+ gridHighlight$: observer.multiGridHighlight$,
103
103
  gridContainerPosition$: d.gridContainerPosition$,
104
104
  isSeriesSeprate$: isSeriesSeprate$,
105
105
  event$: subject.event$ as Subject<any>,
@@ -77,8 +77,8 @@ export const MultiDots = defineMultiGridPlugin(pluginConfig)(({ selection, name,
77
77
  selection: gridSelection,
78
78
  computedData$: d.computedData$,
79
79
  visibleComputedData$: d.visibleComputedData$,
80
- computedLayoutData$: d.computedLayoutData$,
81
- visibleComputedLayoutData$: d.visibleComputedLayoutData$,
80
+ computedAxesData$: d.computedAxesData$,
81
+ visibleComputedAxesData$: d.visibleComputedAxesData$,
82
82
  seriesLabels$: d.seriesLabels$,
83
83
  SeriesDataMap$: d.SeriesDataMap$,
84
84
  GroupDataMap$: d.GroupDataMap$,
@@ -88,7 +88,7 @@ export const MultiDots = defineMultiGridPlugin(pluginConfig)(({ selection, name,
88
88
  gridGraphicTransform$: d.gridGraphicTransform$,
89
89
  gridGraphicReverseScale$: d.gridGraphicReverseScale$,
90
90
  gridAxesSize$: d.gridAxesSize$,
91
- gridHighlight$: d.gridHighlight$,
91
+ gridHighlight$: observer.multiGridHighlight$,
92
92
  gridContainerPosition$: d.gridContainerPosition$,
93
93
  event$: subject.event$ as Subject<any>,
94
94
  })
@@ -88,18 +88,28 @@ export const MultiGridLegend = defineMultiGridPlugin(pluginConfig)(({ selection,
88
88
 
89
89
  const destroy$ = new Subject()
90
90
 
91
+ // const seriesLabels$ = observer.multiGridEachDetail$.pipe(
92
+ // takeUntil(destroy$),
93
+ // map(multiGrid => {
94
+ // const seriesLabelsObservableArr = multiGrid.map((grid, gridIndex) => {
95
+ // return grid.SeriesDataMap$.pipe(
96
+ // // grid內的seriesLabels
97
+ // map(seriesDataMap => Array.from(seriesDataMap.keys()))
98
+ // )
99
+ // })
100
+ // return seriesLabelsObservableArr
101
+ // }),
102
+ // switchMap(seriesLabelsObservableArr => combineLatest(seriesLabelsObservableArr)),
103
+ // map(data => data.flat())
104
+ // )
105
+
91
106
  const seriesLabels$ = observer.multiGridEachDetail$.pipe(
92
- takeUntil(destroy$),
93
- map(multiGrid => {
94
- const seriesLabelsObservableArr = multiGrid.map((grid, gridIndex) => {
95
- return grid.SeriesDataMap$.pipe(
96
- // grid內的seriesLabels
97
- map(seriesDataMap => Array.from(seriesDataMap.keys()))
98
- )
99
- })
100
- return seriesLabelsObservableArr
107
+ map(multiGridEachDetail => multiGridEachDetail.map(grid => grid.seriesLabels$)),
108
+ switchMap(d => {
109
+ return combineLatest(d).pipe(
110
+ switchMap(async d => d),
111
+ )
101
112
  }),
102
- switchMap(seriesLabelsObservableArr => combineLatest(seriesLabelsObservableArr)),
103
113
  map(data => data.flat())
104
114
  )
105
115
 
@@ -79,9 +79,9 @@ export const MultiLineAreas = defineMultiGridPlugin(pluginConfig)(({ selection,
79
79
  unsubscribeFnArr[i] = createBaseLineAreas(pluginName, {
80
80
  selection: gridSelection,
81
81
  computedData$: d.computedData$,
82
- computedLayoutData$: d.computedLayoutData$,
82
+ computedAxesData$: d.computedAxesData$,
83
83
  visibleComputedData$: d.visibleComputedData$,
84
- visibleComputedLayoutData$: d.visibleComputedLayoutData$,
84
+ visibleComputedAxesData$: d.visibleComputedAxesData$,
85
85
  seriesLabels$: d.seriesLabels$,
86
86
  SeriesDataMap$: d.SeriesDataMap$,
87
87
  GroupDataMap$: d.GroupDataMap$,
@@ -91,7 +91,7 @@ export const MultiLineAreas = defineMultiGridPlugin(pluginConfig)(({ selection,
91
91
  gridAxesTransform$: d.gridAxesTransform$,
92
92
  gridGraphicTransform$: d.gridGraphicTransform$,
93
93
  gridAxesSize$: d.gridAxesSize$,
94
- gridHighlight$: d.gridHighlight$,
94
+ gridHighlight$: observer.multiGridHighlight$,
95
95
  gridContainerPosition$: d.gridContainerPosition$,
96
96
  allContainerPosition$: allContainerPosition$,
97
97
  layout$: observer.layout$,
@@ -73,9 +73,9 @@ export const MultiLines = defineMultiGridPlugin(pluginConfig)(({ selection, root
73
73
  unsubscribeFnArr[i] = createBaseLines(pluginName, {
74
74
  selection: gridSelection,
75
75
  computedData$: d.computedData$,
76
- computedLayoutData$: d.computedLayoutData$,
76
+ computedAxesData$: d.computedAxesData$,
77
77
  visibleComputedData$: d.visibleComputedData$,
78
- visibleComputedLayoutData$: d.visibleComputedLayoutData$,
78
+ visibleComputedAxesData$: d.visibleComputedAxesData$,
79
79
  seriesLabels$: d.seriesLabels$,
80
80
  SeriesDataMap$: d.SeriesDataMap$,
81
81
  GroupDataMap$: d.GroupDataMap$,
@@ -85,7 +85,7 @@ export const MultiLines = defineMultiGridPlugin(pluginConfig)(({ selection, root
85
85
  gridAxesTransform$: d.gridAxesTransform$,
86
86
  gridGraphicTransform$: d.gridGraphicTransform$,
87
87
  gridAxesSize$: d.gridAxesSize$,
88
- gridHighlight$: d.gridHighlight$,
88
+ gridHighlight$: observer.multiGridHighlight$,
89
89
  gridContainerPosition$: d.gridContainerPosition$,
90
90
  allContainerPosition$,
91
91
  layout$: observer.layout$,
@@ -10,12 +10,12 @@ import type { DefinePluginConfig } from '../../../lib/core-types'
10
10
  import {
11
11
  defineMultiGridPlugin } from '../../../lib/core'
12
12
  import { DEFAULT_MULTI_STACKED_BAR_PARAMS } from '../defaults'
13
- import { createBaseStackedBar } from '../../base/BaseStackedBar'
13
+ import { createBaseStackedBars } from '../../base/BaseStackedBars'
14
14
  import { multiGridPluginDetailObservables } from '../multiGridObservables'
15
15
  import { getClassName, getUniID } from '../../utils/orbchartsUtils'
16
16
  import { LAYER_INDEX_OF_GRAPHIC } from '../../const'
17
17
 
18
- const pluginName = 'MultiStackedBar'
18
+ const pluginName = 'MultiStackedBars'
19
19
 
20
20
  const gridClassName = getClassName(pluginName, 'grid')
21
21
 
@@ -45,7 +45,7 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_MULTI_S
45
45
  }
46
46
  }
47
47
 
48
- export const MultiStackedBar = defineMultiGridPlugin(pluginConfig)(({ selection, name, subject, observer }) => {
48
+ export const MultiStackedBars = defineMultiGridPlugin(pluginConfig)(({ selection, name, subject, observer }) => {
49
49
  const destroy$ = new Subject()
50
50
 
51
51
  const unsubscribeFnArr: (() => void)[] = []
@@ -75,12 +75,12 @@ export const MultiStackedBar = defineMultiGridPlugin(pluginConfig)(({ selection,
75
75
  shareReplay(1)
76
76
  )
77
77
 
78
- unsubscribeFnArr[i] = createBaseStackedBar(pluginName, {
78
+ unsubscribeFnArr[i] = createBaseStackedBars(pluginName, {
79
79
  selection: gridSelection,
80
80
  computedData$: d.computedData$,
81
81
  visibleComputedData$: d.visibleComputedData$,
82
- computedLayoutData$: d.computedLayoutData$,
83
- visibleComputedLayoutData$: d.visibleComputedLayoutData$,
82
+ computedAxesData$: d.computedAxesData$,
83
+ visibleComputedAxesData$: d.visibleComputedAxesData$,
84
84
  seriesLabels$: d.seriesLabels$,
85
85
  SeriesDataMap$: d.SeriesDataMap$,
86
86
  GroupDataMap$: d.GroupDataMap$,
@@ -91,7 +91,7 @@ export const MultiStackedBar = defineMultiGridPlugin(pluginConfig)(({ selection,
91
91
  gridGraphicTransform$: d.gridGraphicTransform$,
92
92
  gridGraphicReverseScale$: d.gridGraphicReverseScale$,
93
93
  gridAxesSize$: d.gridAxesSize$,
94
- gridHighlight$: d.gridHighlight$,
94
+ gridHighlight$: observer.multiGridHighlight$,
95
95
  gridContainerPosition$: d.gridContainerPosition$,
96
96
  isSeriesSeprate$,
97
97
  event$: subject.event$ as Subject<any>,
@@ -19,6 +19,7 @@ import { createBaseValueAxis } from '../../base/BaseValueAxis'
19
19
  import { multiGridPluginDetailObservables } from '../multiGridObservables'
20
20
  import { getClassName, getUniID } from '../../utils/orbchartsUtils'
21
21
  import { gridAxesTransformObservable, gridAxesReverseTransformObservable, gridContainerPositionObservable } from '../../../lib/core'
22
+ // import { gridAxesTransformObservable, gridAxesReverseTransformObservable, gridContainerPositionObservable } from '@orbcharts/core/src'
22
23
  import { LAYER_INDEX_OF_AXIS } from '../../const'
23
24
 
24
25
  const pluginName = 'OverlappingStackedValueAxes'
@@ -1,11 +1,16 @@
1
+ import type { ComputedDataTypeMap } from '../../lib/core-types'
1
2
  import type {
2
3
  MultiValueLegendParams,
3
4
  MultiValueTooltipParams,
5
+ RacingBarsParams,
6
+ RacingCounterTextsParams,
7
+ RacingValueAxisParams,
4
8
  ScatterParams,
5
9
  ScatterBubblesParams,
10
+ XAxisParams,
6
11
  XYAuxParams,
7
12
  XYAxesParams,
8
- XYZoomParams
13
+ XZoomParams
9
14
  } from '../../lib/plugins-basic-types'
10
15
 
11
16
 
@@ -47,7 +52,7 @@ export const DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS: MultiValueTooltipParams = {
47
52
  ? `<tspan>${eventData.datum.label}</tspan> `
48
53
  : ''
49
54
  const datumSvg = `<text font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">
50
- ${datumLabelSvg}<tspan font-weight="bold">${eventData.datum.value}</tspan>
55
+ ${datumLabelSvg}<tspan font-weight="bold">${eventData.datum._visibleValue}</tspan>
51
56
  </text>`
52
57
 
53
58
  return `${categorySvg}
@@ -71,7 +76,7 @@ DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS.renderFn.toString = () => `(eventData, { styl
71
76
  ? \`<tspan>\${eventData.datum.label}</tspan> \`
72
77
  : ''
73
78
  const datumSvg = \`<text font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
74
- \${datumLabelSvg}<tspan font-weight="bold">\${eventData.datum.value}</tspan>
79
+ \${datumLabelSvg}<tspan font-weight="bold">\${eventData.datum._visibleValue}</tspan>
75
80
  </text>\`
76
81
 
77
82
  return \`\${categorySvg}
@@ -80,6 +85,117 @@ DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS.renderFn.toString = () => `(eventData, { styl
80
85
  </g>\`
81
86
  }`
82
87
 
88
+ // export const DEFAULT_RANKING_AXIS_PARAMS: RacingAxisParams = {
89
+ // labelOffset: [0, 0],
90
+ // labelColorType: 'primary',
91
+ // axisLineVisible: false,
92
+ // axisLineColorType: 'primary',
93
+ // // ticks: null,
94
+ // // tickFormat: v => v,
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_RACING_BARS_PARAMS: RacingBarsParams = {
105
+ bar: {
106
+ barWidth: 0,
107
+ barPadding: 8,
108
+ barRadius: false,
109
+ },
110
+ barLabel: {
111
+ position: 'inside',
112
+ padding: 20,
113
+ rotate: 0,
114
+ colorType: 'labelContrast'
115
+ },
116
+ valueLabel: {
117
+ padding: 20,
118
+ colorType: 'primary',
119
+ // format: num => {
120
+ // if (num === null || Number.isNaN(num) == true) {
121
+ // return num || 0
122
+ // }
123
+ // var parts = num.toString().split('.')
124
+ // parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
125
+ // return parts.join('.')
126
+ // }
127
+ format: v => v
128
+ },
129
+ axisLabel: {
130
+ offset: [0, 0],
131
+ colorType: 'primary'
132
+ },
133
+ // rankingAmount: 'auto'
134
+ rankingAmount: 10,
135
+ // timer: {
136
+ // active: false,
137
+ // period: 500
138
+ // }
139
+ autorun: false
140
+ }
141
+ // DEFAULT_RACING_BARS_PARAMS.valueLabel.format.toString = () => `num => {
142
+ // if (num === null || Number.isNaN(num) == true) {
143
+ // return num || 0
144
+ // }
145
+ // var parts = num.toString().split('.')
146
+ // parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',')
147
+ // return parts.join('.')
148
+ // }
149
+ // }`
150
+ DEFAULT_RACING_BARS_PARAMS.valueLabel.format.toString = () => `v => v`
151
+
152
+ export const DEFAULT_RACING_COUNTER_TEXTS_PARAMS: RacingCounterTextsParams = {
153
+ renderFn: (valueLabel: string, valueIndex: number, data: ComputedDataTypeMap<'multiValue'>) => {
154
+ return valueLabel
155
+ },
156
+ textAttrs: [
157
+ {
158
+ "transform": "translate(0, 0)"
159
+ }
160
+ ],
161
+ textStyles: [
162
+ {
163
+ "font-weight": "bold",
164
+ "text-anchor": "end",
165
+ "pointer-events": "none",
166
+ "dominant-baseline": "auto",
167
+ "font-size": 64,
168
+ "fill": "#bebebe"
169
+ },
170
+ {
171
+ "text-anchor": "end",
172
+ "pointer-events": "none",
173
+ "dominant-baseline": "auto",
174
+ "font-size": 24,
175
+ "fill": "#bebebe"
176
+ },
177
+ ],
178
+ paddingRight: 0,
179
+ paddingBottom: 0
180
+ }
181
+
182
+ export const DEFAULT_RACING_VALUE_AXIS_PARAMS: RacingValueAxisParams = {
183
+ labelOffset: [0, 0],
184
+ labelColorType: 'primary',
185
+ axisLineVisible: false,
186
+ axisLineColorType: 'secondary',
187
+ ticks: null,
188
+ // tickFormat: ',.0f',
189
+ tickFormat: v => v,
190
+ tickLineVisible: true,
191
+ tickPadding: 20,
192
+ tickFullLine: true,
193
+ tickFullLineDasharray: 'none',
194
+ tickColorType: 'secondary',
195
+ tickTextColorType: 'primary'
196
+ }
197
+ DEFAULT_RACING_VALUE_AXIS_PARAMS.tickFormat.toString = () => `v => v`
198
+
83
199
  export const DEFAULT_SCATTER_PARAMS: ScatterParams = {
84
200
  radius: 5,
85
201
  fillColorType: 'label',
@@ -97,6 +213,23 @@ export const DEFAULT_SCATTER_BUBBLES_PARAMS: ScatterBubblesParams = {
97
213
  sizeAdjust: 0.5
98
214
  }
99
215
 
216
+ export const DEFAULT_X_AXIS_PARAMS: XAxisParams = {
217
+ labelOffset: [0, 0],
218
+ labelColorType: 'primary',
219
+ axisLineVisible: false,
220
+ axisLineColorType: 'secondary',
221
+ ticks: null,
222
+ // tickFormat: ',.0f',
223
+ tickFormat: v => v,
224
+ tickLineVisible: true,
225
+ tickPadding: 20,
226
+ tickFullLine: true,
227
+ tickFullLineDasharray: 'none',
228
+ tickColorType: 'secondary',
229
+ tickTextColorType: 'primary'
230
+ }
231
+ DEFAULT_X_AXIS_PARAMS.tickFormat.toString = () => `v => v`
232
+
100
233
  export const DEFAULT_X_Y_AUX_PARAMS: XYAuxParams = {
101
234
  xAxis: {
102
235
  showLine: true,
@@ -162,6 +295,6 @@ export const DEFAULT_X_Y_AXES_PARAMS: XYAxesParams = {
162
295
  DEFAULT_X_Y_AXES_PARAMS.xAxis.tickFormat.toString = () => `v => v`
163
296
  DEFAULT_X_Y_AXES_PARAMS.yAxis.tickFormat.toString = () => `v => v`
164
297
 
165
- export const DEFAULT_X_Y_ZOOM_PARAMS: XYZoomParams = {
298
+ export const DEFAULT_X_Y_ZOOM_PARAMS: XZoomParams = {
166
299
 
167
300
  }
@@ -2,8 +2,12 @@ export * from './defaults'
2
2
  // export * from './types'
3
3
  export { MultiValueLegend } from './plugins/MultiValueLegend'
4
4
  export { MultiValueTooltip } from './plugins/MultiValueTooltip'
5
+ export { RacingBars } from './plugins/RacingBars'
6
+ export { RacingCounterTexts } from './plugins/RacingCounterTexts'
7
+ export { RacingValueAxis } from './plugins/RacingValueAxis'
5
8
  export { Scatter } from './plugins/Scatter'
6
9
  export { ScatterBubbles } from './plugins/ScatterBubbles'
10
+ export { XAxis } from './plugins/XAxis'
7
11
  export { XYAux } from './plugins/XYAux'
8
12
  export { XYAxes } from './plugins/XYAxes'
9
- export { XYZoom } from './plugins/XYZoom'
13
+ export { XZoom } from './plugins/XZoom'