@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
@@ -13,7 +13,7 @@ import type {
13
13
  ComputedDatumGrid,
14
14
  ComputedDataGrid,
15
15
  ComputedLayoutDatumGrid,
16
- ComputedLayoutDataGrid,
16
+ ComputedAxesDataGrid,
17
17
  DataFormatterTypeMap,
18
18
  EventGrid,
19
19
  ChartParams,
@@ -36,9 +36,9 @@ import { gridSelectionsObservable } from '../grid/gridObservables'
36
36
  interface BaseBarsContext {
37
37
  selection: d3.Selection<any, unknown, any, unknown>
38
38
  computedData$: Observable<ComputedDataGrid>
39
- computedLayoutData$: Observable<ComputedLayoutDataGrid>
39
+ computedAxesData$: Observable<ComputedAxesDataGrid>
40
40
  visibleComputedData$: Observable<ComputedDatumGrid[][]>
41
- visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
41
+ visibleComputedAxesData$: Observable<ComputedAxesDataGrid>
42
42
  fullDataFormatter$: Observable<DataFormatterTypeMap<'grid'>>
43
43
  seriesLabels$: Observable<string[]>
44
44
  SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
@@ -62,7 +62,7 @@ interface RenderBarParams {
62
62
  graphicGSelection: d3.Selection<SVGGElement, unknown, any, any>
63
63
  pathGClassName: string
64
64
  pathClassName: string
65
- visibleComputedLayoutData: ComputedLayoutDataGrid
65
+ visibleComputedAxesData: ComputedAxesDataGrid
66
66
  linearGradientIds: string[]
67
67
  zeroYArr: number[]
68
68
  groupLabels: string[]
@@ -131,7 +131,7 @@ function calctransitionItem (barGroupAmount: number, totalDuration: number) {
131
131
  return totalDuration * (1 - groupDelayProportionOfDuration) // delay後剩餘的時間
132
132
  }
133
133
 
134
- function renderTriangleBars ({ graphicGSelection, pathGClassName, pathClassName, visibleComputedLayoutData, linearGradientIds, zeroYArr, groupLabels, barScale, params, chartParams, barWidth, delayGroup, transitionItem, isSeriesSeprate }: RenderBarParams) {
134
+ function renderTriangleBars ({ graphicGSelection, pathGClassName, pathClassName, visibleComputedAxesData, linearGradientIds, zeroYArr, groupLabels, barScale, params, chartParams, barWidth, delayGroup, transitionItem, isSeriesSeprate }: RenderBarParams) {
135
135
 
136
136
  const barHalfWidth = barWidth! / 2
137
137
 
@@ -140,7 +140,7 @@ function renderTriangleBars ({ graphicGSelection, pathGClassName, pathClassName,
140
140
  // g
141
141
  const gSelection = d3.select(g[seriesIndex])
142
142
  .selectAll<SVGGElement, ComputedDatumGrid>(`g.${pathGClassName}`)
143
- .data(visibleComputedLayoutData[seriesIndex] ?? [])
143
+ .data(visibleComputedAxesData[seriesIndex] ?? [])
144
144
  .join(
145
145
  enter => {
146
146
  const enterSelection = enter
@@ -299,9 +299,9 @@ function highlight ({ selection, ids, fullChartParams }: {
299
299
  export const createBaseBarsTriangle: BasePluginFn<BaseBarsContext> = (pluginName: string, {
300
300
  selection,
301
301
  computedData$,
302
- computedLayoutData$,
302
+ computedAxesData$,
303
303
  visibleComputedData$,
304
- visibleComputedLayoutData$,
304
+ visibleComputedAxesData$,
305
305
  fullDataFormatter$,
306
306
  seriesLabels$,
307
307
  SeriesDataMap$,
@@ -346,7 +346,7 @@ export const createBaseBarsTriangle: BasePluginFn<BaseBarsContext> = (pluginName
346
346
  })
347
347
  )
348
348
 
349
- const zeroYArr$ = visibleComputedLayoutData$.pipe(
349
+ const zeroYArr$ = visibleComputedAxesData$.pipe(
350
350
  // map(d => d[0] && d[0][0]
351
351
  // ? d[0][0].axisY - d[0][0].axisYFromZero
352
352
  // : 0),
@@ -522,7 +522,7 @@ export const createBaseBarsTriangle: BasePluginFn<BaseBarsContext> = (pluginName
522
522
  graphicGSelection: graphicGSelection$,
523
523
  defsSelection: defsSelection$,
524
524
  computedData: computedData$,
525
- visibleComputedLayoutData: visibleComputedLayoutData$,
525
+ visibleComputedAxesData: visibleComputedAxesData$,
526
526
  linearGradientIds: linearGradientIds$,
527
527
  zeroYArr: zeroYArr$,
528
528
  groupLabels: groupLabels$,
@@ -548,7 +548,7 @@ export const createBaseBarsTriangle: BasePluginFn<BaseBarsContext> = (pluginName
548
548
  graphicGSelection: data.graphicGSelection,
549
549
  pathGClassName,
550
550
  pathClassName,
551
- visibleComputedLayoutData: data.visibleComputedLayoutData,
551
+ visibleComputedAxesData: data.visibleComputedAxesData,
552
552
  linearGradientIds: data.linearGradientIds,
553
553
  zeroYArr: data.zeroYArr,
554
554
  groupLabels: data.groupLabels,
@@ -11,7 +11,7 @@ import type { BasePluginFn } from './types'
11
11
  import type {
12
12
  ComputedDatumGrid,
13
13
  ComputedDataGrid,
14
- ComputedLayoutDataGrid,
14
+ ComputedAxesDataGrid,
15
15
  EventGrid,
16
16
  ChartParams,
17
17
  ContainerPositionScaled,
@@ -35,9 +35,9 @@ import { gridSelectionsObservable } from '../grid/gridObservables'
35
35
  interface BaseDotsContext {
36
36
  selection: d3.Selection<any, unknown, any, unknown>
37
37
  computedData$: Observable<ComputedDataGrid>
38
- computedLayoutData$: Observable<ComputedLayoutDataGrid>
38
+ computedAxesData$: Observable<ComputedAxesDataGrid>
39
39
  visibleComputedData$: Observable<ComputedDatumGrid[][]>
40
- visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
40
+ visibleComputedAxesData$: Observable<ComputedAxesDataGrid>
41
41
  seriesLabels$: Observable<string[]>
42
42
  SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
43
43
  GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
@@ -68,11 +68,11 @@ type ClipPathDatum = {
68
68
  // const circleGClassName = getClassName(pluginName, 'circleG')
69
69
  // const circleClassName = getClassName(pluginName, 'circle')
70
70
 
71
- function renderDots ({ graphicGSelection, circleGClassName, circleClassName, visibleComputedLayoutData, fullParams, fullChartParams, graphicReverseScale }: {
71
+ function renderDots ({ graphicGSelection, circleGClassName, circleClassName, visibleComputedAxesData, fullParams, fullChartParams, graphicReverseScale }: {
72
72
  graphicGSelection: d3.Selection<SVGGElement, any, any, any>
73
73
  circleGClassName: string
74
74
  circleClassName: string
75
- visibleComputedLayoutData: ComputedLayoutDataGrid
75
+ visibleComputedAxesData: ComputedAxesDataGrid
76
76
  fullParams: BaseDotsParams
77
77
  fullChartParams: ChartParams
78
78
  graphicReverseScale: [number, number][]
@@ -89,7 +89,7 @@ function renderDots ({ graphicGSelection, circleGClassName, circleClassName, vis
89
89
  .each((seriesData, seriesIndex, g) => {
90
90
  d3.select(g[seriesIndex])
91
91
  .selectAll<SVGGElement, ComputedDatumGrid>('g')
92
- .data(visibleComputedLayoutData[seriesIndex], d => d.id)
92
+ .data(visibleComputedAxesData[seriesIndex], d => d.id)
93
93
  .join(
94
94
  enter => {
95
95
  // enterDuration
@@ -222,9 +222,9 @@ function renderClipPath ({ defsSelection, clipPathData }: {
222
222
  export const createBaseDots: BasePluginFn<BaseDotsContext> = (pluginName: string, {
223
223
  selection,
224
224
  computedData$,
225
- computedLayoutData$,
225
+ computedAxesData$,
226
226
  visibleComputedData$,
227
- visibleComputedLayoutData$,
227
+ visibleComputedAxesData$,
228
228
  seriesLabels$,
229
229
  SeriesDataMap$,
230
230
  GroupDataMap$,
@@ -310,7 +310,7 @@ export const createBaseDots: BasePluginFn<BaseDotsContext> = (pluginName: string
310
310
 
311
311
  const graphicSelection$ = combineLatest({
312
312
  graphicGSelection: graphicGSelection$,
313
- visibleComputedLayoutData: visibleComputedLayoutData$,
313
+ visibleComputedAxesData: visibleComputedAxesData$,
314
314
  graphicReverseScale: graphicReverseScale$,
315
315
  fullChartParams: fullChartParams$,
316
316
  fullParams: fullParams$,
@@ -322,7 +322,7 @@ export const createBaseDots: BasePluginFn<BaseDotsContext> = (pluginName: string
322
322
  graphicGSelection: data.graphicGSelection,
323
323
  circleGClassName,
324
324
  circleClassName,
325
- visibleComputedLayoutData: data.visibleComputedLayoutData,
325
+ visibleComputedAxesData: data.visibleComputedAxesData,
326
326
  fullParams: data.fullParams,
327
327
  fullChartParams: data.fullChartParams,
328
328
  graphicReverseScale: data.graphicReverseScale
@@ -234,6 +234,7 @@ function renderAxis ({ selection, xAxisClassName, fullParams, tickTextAlign, gri
234
234
  const xAxisEl = xAxisSelection
235
235
  .transition()
236
236
  .duration(100)
237
+ .ease(d3.easeLinear) // 線性的 - 當托曳或快速變動的時候比較滑順
237
238
  .call(xAxis)
238
239
  .on('end', (self, t) => {
239
240
  // 先等transition結束再處理文字,否則會被原本的文字覆蓋
@@ -257,6 +258,7 @@ function renderAxis ({ selection, xAxisClassName, fullParams, tickTextAlign, gri
257
258
  .style('fill', 'none')
258
259
  .style('stroke', fullParams.tickLineVisible == true ? getColor(fullParams.tickColorType, chartParams) : 'none')
259
260
  .style('stroke-dasharray', fullParams.tickFullLineDasharray)
261
+ .style('vector-effect', 'non-scaling-stroke') // 避免 scale 導致線條變形
260
262
  .attr('pointer-events', 'none')
261
263
 
262
264
  xAxisEl.selectAll('path')
@@ -13,7 +13,7 @@ import type {
13
13
  ComputedDatumGrid,
14
14
  ComputedDataGrid,
15
15
  ComputedLayoutDatumGrid,
16
- ComputedLayoutDataGrid,
16
+ ComputedAxesDataGrid,
17
17
  DataFormatterGrid,
18
18
  EventGrid,
19
19
  ContainerPositionScaled,
@@ -36,9 +36,9 @@ import { gridSelectionsObservable } from '../grid/gridObservables'
36
36
  interface BaseLineAreasContext {
37
37
  selection: d3.Selection<any, unknown, any, unknown>
38
38
  computedData$: Observable<ComputedDataGrid>
39
- computedLayoutData$: Observable<ComputedLayoutDataGrid>
39
+ computedAxesData$: Observable<ComputedAxesDataGrid>
40
40
  visibleComputedData$: Observable<ComputedDatumGrid[][]>
41
- visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
41
+ visibleComputedAxesData$: Observable<ComputedAxesDataGrid>
42
42
  seriesLabels$: Observable<string[]>
43
43
  SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
44
44
  GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
@@ -262,9 +262,9 @@ function renderClipPath ({ defsSelection, clipPathData, transitionDuration, tran
262
262
  export const createBaseLineAreas: BasePluginFn<BaseLineAreasContext> = (pluginName: string, {
263
263
  selection,
264
264
  computedData$,
265
- computedLayoutData$,
265
+ computedAxesData$,
266
266
  visibleComputedData$,
267
- visibleComputedLayoutData$,
267
+ visibleComputedAxesData$,
268
268
  seriesLabels$,
269
269
  SeriesDataMap$,
270
270
  GroupDataMap$,
@@ -431,7 +431,7 @@ export const createBaseLineAreas: BasePluginFn<BaseLineAreasContext> = (pluginNa
431
431
  const pathSelectionArr$ = combineLatest({
432
432
  graphicGSelection: graphicGSelection$,
433
433
  defsSelection: defsSelection$,
434
- visibleComputedLayoutData: visibleComputedLayoutData$,
434
+ visibleComputedAxesData: visibleComputedAxesData$,
435
435
  linearGradientIds: linearGradientIds$,
436
436
  areaPath: areaPath$,
437
437
  params: fullParams$,
@@ -453,7 +453,7 @@ export const createBaseLineAreas: BasePluginFn<BaseLineAreasContext> = (pluginNa
453
453
  // 繪圖
454
454
  data.graphicGSelection.each((d, i, all) => {
455
455
  // 將資料分段
456
- const segmentData = makeSegmentData(data.visibleComputedLayoutData[i] ?? [])
456
+ const segmentData = makeSegmentData(data.visibleComputedAxesData[i] ?? [])
457
457
 
458
458
  pathSelectionArr[i] = renderLineAreas({
459
459
  selection: d3.select(all[i]),
@@ -465,7 +465,7 @@ export const createBaseLineAreas: BasePluginFn<BaseLineAreasContext> = (pluginNa
465
465
  })
466
466
  renderLinearGradient({
467
467
  defsSelection: data.defsSelection,
468
- computedData: data.visibleComputedLayoutData,
468
+ computedData: data.visibleComputedAxesData,
469
469
  linearGradientIds: data.linearGradientIds,
470
470
  params: data.params
471
471
  })
@@ -13,7 +13,7 @@ import type {
13
13
  ComputedDatumGrid,
14
14
  ComputedDataGrid,
15
15
  ComputedLayoutDatumGrid,
16
- ComputedLayoutDataGrid,
16
+ ComputedAxesDataGrid,
17
17
  DataFormatterGrid,
18
18
  EventGrid,
19
19
  ContainerPositionScaled,
@@ -42,9 +42,9 @@ import { gridSelectionsObservable } from '../grid/gridObservables'
42
42
  interface BaseLinesContext {
43
43
  selection: d3.Selection<any, unknown, any, unknown>
44
44
  computedData$: Observable<ComputedDataGrid>
45
- computedLayoutData$: Observable<ComputedLayoutDataGrid>
45
+ computedAxesData$: Observable<ComputedAxesDataGrid>
46
46
  visibleComputedData$: Observable<ComputedDatumGrid[][]>
47
- visibleComputedLayoutData$: Observable<ComputedLayoutDataGrid>
47
+ visibleComputedAxesData$: Observable<ComputedAxesDataGrid>
48
48
  seriesLabels$: Observable<string[]>
49
49
  SeriesDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
50
50
  GroupDataMap$: Observable<Map<string, ComputedDatumGrid[]>>
@@ -230,9 +230,9 @@ function renderClipPath ({ defsSelection, clipPathData, transitionDuration, tran
230
230
  export const createBaseLines: BasePluginFn<BaseLinesContext> = (pluginName: string, {
231
231
  selection,
232
232
  computedData$,
233
- computedLayoutData$,
233
+ computedAxesData$,
234
234
  visibleComputedData$,
235
- visibleComputedLayoutData$,
235
+ visibleComputedAxesData$,
236
236
  seriesLabels$,
237
237
  SeriesDataMap$,
238
238
  GroupDataMap$,
@@ -515,7 +515,7 @@ export const createBaseLines: BasePluginFn<BaseLinesContext> = (pluginName: stri
515
515
 
516
516
  const pathSelectionArr$ = combineLatest({
517
517
  graphicGSelection: graphicGSelection$,
518
- visibleComputedLayoutData: visibleComputedLayoutData$,
518
+ visibleComputedAxesData: visibleComputedAxesData$,
519
519
  linePath: linePath$,
520
520
  params: fullParams$,
521
521
  }).pipe(
@@ -536,7 +536,7 @@ export const createBaseLines: BasePluginFn<BaseLinesContext> = (pluginName: stri
536
536
  // 繪圖
537
537
  data.graphicGSelection.each((d, i, all) => {
538
538
  // 將資料分段
539
- const segmentData = makeSegmentData(data.visibleComputedLayoutData[i] ?? [])
539
+ const segmentData = makeSegmentData(data.visibleComputedAxesData[i] ?? [])
540
540
 
541
541
  pathSelectionArr[i] = renderLines({
542
542
  selection: d3.select(all[i]),