@orbcharts/plugins-basic 3.0.0-beta.14 → 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
@@ -0,0 +1,389 @@
1
+ import * as d3 from 'd3'
2
+ import {
3
+ Observable,
4
+ Subject,
5
+ combineLatest,
6
+ takeUntil,
7
+ map,
8
+ distinctUntilChanged,
9
+ switchMap,
10
+ shareReplay
11
+ } from 'rxjs'
12
+ import type {
13
+ ColorType,
14
+ ChartParams,
15
+ ComputedDatumMultiValue,
16
+ ComputedDataMultiValue,
17
+ ComputedXYDatumMultiValue,
18
+ ContainerPositionScaled,
19
+ ContainerSize,
20
+ DataFormatterMultiValue,
21
+ DefinePluginConfig,
22
+ TransformData,
23
+ Layout
24
+ } from '../../lib/core-types'
25
+ import {
26
+ createValueToAxisScale,
27
+ } from '../../lib/core'
28
+ import type { BaseYAxisParams
29
+ } from '../../lib/plugins-basic-types'
30
+ import type { BasePluginFn } from './types'
31
+ // import { DEFAULT_X_Y_AXES_PARAMS } from '../defaults'
32
+ // import { LAYER_INDEX_OF_AXIS } from '../const'
33
+ import { getColor, getDatumColor, getClassName, getUniID } from '../utils/orbchartsUtils'
34
+ import { parseTickFormatValue } from '../utils/d3Utils'
35
+ import { multiValueContainerSelectionsObservable } from '../multiValue/multiValueObservables'
36
+
37
+ interface BaseYAxisContext {
38
+ selection: d3.Selection<any, unknown, any, unknown>
39
+ computedData$: Observable<ComputedDataMultiValue>
40
+ // filteredMinMaxValue$: Observable<[number, number]>
41
+ fullParams$: Observable<BaseYAxisParams>
42
+ fullDataFormatter$: Observable<DataFormatterMultiValue>
43
+ fullChartParams$: Observable<ChartParams>
44
+ isCategorySeprate$: Observable<boolean>
45
+ containerPosition$: Observable<ContainerPositionScaled[]>
46
+ containerSize$: Observable<ContainerSize>
47
+ // layout$: Observable<Layout>
48
+ // filteredXYMinMaxData$: Observable<{
49
+ // datumList: ComputedXYDatumMultiValue[];
50
+ // minXDatum: ComputedXYDatumMultiValue | null;
51
+ // maxXDatum: ComputedXYDatumMultiValue | null;
52
+ // minYDatum: ComputedXYDatumMultiValue | null;
53
+ // maxYDatum: ComputedXYDatumMultiValue | null;
54
+ // }>
55
+ yScale$: Observable<d3.ScaleLinear<number, number>>
56
+ // xyMinMax$: Observable<{
57
+ // minX: number;
58
+ // maxX: number;
59
+ // minY: number;
60
+ // maxY: number;
61
+ // }>
62
+ }
63
+
64
+ // interface TextAlign {
65
+ // textAnchor: "start" | "middle" | "end"
66
+ // dominantBaseline: "middle" | "auto" | "hanging"
67
+ // }
68
+
69
+ const defaultTickSize = 6
70
+
71
+ const yTickTextAnchor = 'end'
72
+ const yTickDominantBaseline = 'middle'
73
+ const yAxisLabelAnchor = 'end'
74
+ const yAxisLabelDominantBaseline = 'auto'
75
+
76
+ function renderYAxisLabel ({ selection, yLabelClassName, fullParams, containerSize, fullDataFormatter, fullChartParams }: {
77
+ selection: d3.Selection<SVGGElement, any, any, any>,
78
+ yLabelClassName: string
79
+ fullParams: BaseYAxisParams
80
+ // axisLabelAlign: TextAlign
81
+ containerSize: { width: number, height: number }
82
+ fullDataFormatter: DataFormatterMultiValue,
83
+ fullChartParams: ChartParams
84
+ // textReverseTransform: string,
85
+ }) {
86
+ const offsetX = fullParams.tickPadding - fullParams.labelOffset[0]
87
+ const offsetY = fullParams.tickPadding + fullParams.labelOffset[1]
88
+ let labelX = - offsetX
89
+ let labelY = - offsetY
90
+
91
+ const axisLabelSelection = selection
92
+ .selectAll<SVGGElement, BaseYAxisParams>(`g.${yLabelClassName}`)
93
+ .data([fullParams])
94
+ .join('g')
95
+ .classed(yLabelClassName, true)
96
+ .each((d, i, g) => {
97
+ const text = d3.select(g[i])
98
+ .selectAll<SVGTextElement, BaseYAxisParams>(`text`)
99
+ .data([d])
100
+ .join(
101
+ enter => {
102
+ return enter
103
+ .append('text')
104
+ .style('font-weight', 'bold')
105
+ },
106
+ update => update,
107
+ exit => exit.remove()
108
+ )
109
+ .attr('text-anchor', yAxisLabelAnchor)
110
+ .attr('dominant-baseline', yAxisLabelDominantBaseline)
111
+ .attr('font-size', fullChartParams.styles.textSize)
112
+ .style('fill', getColor(fullParams.labelColorType, fullChartParams))
113
+ // .style('transform', textReverseTransform)
114
+ // 偏移使用 x, y 而非 transform 才不會受到外層 scale 變形影響
115
+ .attr('x', labelX)
116
+ .attr('y', labelY)
117
+ .text(d => fullDataFormatter.yAxis.label)
118
+ })
119
+ // .attr('transform', d => `translate(0, ${layout.height})`)
120
+ }
121
+
122
+ function renderYAxis ({ selection, yAxisClassName, fullParams, containerSize, fullDataFormatter, fullChartParams, yScale }: {
123
+ selection: d3.Selection<SVGGElement, any, any, any>,
124
+ yAxisClassName: string
125
+ fullParams: BaseYAxisParams
126
+ // tickTextAlign: TextAlign
127
+ containerSize: ContainerSize
128
+ fullDataFormatter: DataFormatterMultiValue,
129
+ fullChartParams: ChartParams
130
+ yScale: d3.ScaleLinear<number, number>
131
+ // textReverseTransform: string,
132
+ // xyMinMax: {
133
+ // minX: number;
134
+ // maxX: number;
135
+ // minY: number;
136
+ // maxY: number;
137
+ // }
138
+ }) {
139
+
140
+ const yAxisSelection = selection
141
+ .selectAll<SVGGElement, BaseYAxisParams>(`g.${yAxisClassName}`)
142
+ .data([fullParams])
143
+ .join('g')
144
+ .classed(yAxisClassName, true)
145
+
146
+ // const _yScale = d3.scaleLinear()
147
+ // .domain([0, 150])
148
+ // .range([416.5, 791.349])
149
+
150
+ // 刻度文字偏移
151
+ let tickPadding = fullParams.tickPadding
152
+
153
+ // 設定Y軸刻度
154
+ const yAxis = d3.axisLeft(yScale)
155
+ .scale(yScale)
156
+ .ticks(fullParams.ticks) // 刻度分段數量
157
+ .tickFormat(d => parseTickFormatValue(d, fullParams.tickFormat))
158
+ .tickSize(fullParams.tickFullLine == true
159
+ ? -containerSize.width
160
+ : defaultTickSize)
161
+ .tickPadding(tickPadding)
162
+
163
+ const yAxisEl = yAxisSelection
164
+ .transition()
165
+ .duration(100)
166
+ .ease(d3.easeLinear) // 線性的 - 當托曳或快速變動的時候比較滑順
167
+ .call(yAxis)
168
+
169
+ yAxisEl.selectAll('line')
170
+ .style('fill', 'none')
171
+ .style('stroke', fullParams.tickLineVisible == true ? getColor(fullParams.tickColorType, fullChartParams) : 'none')
172
+ .style('stroke-dasharray', fullParams.tickFullLineDasharray)
173
+ .attr('pointer-events', 'none')
174
+
175
+ yAxisEl.selectAll('path')
176
+ .style('fill', 'none')
177
+ // .style('stroke', this.fullParams.axisLineColor!)
178
+ .style('stroke', fullParams.axisLineVisible == true ? getColor(fullParams.axisLineColorType, fullChartParams) : 'none')
179
+ .style('shape-rendering', 'crispEdges')
180
+
181
+ // const yText = yAxisEl.selectAll('text')
182
+ const yText = yAxisSelection.selectAll('text')
183
+ // .style('font-family', 'sans-serif')
184
+ .attr('font-size', fullChartParams.styles.textSize)
185
+ .style('color', getColor(fullParams.tickTextColorType, fullChartParams))
186
+ .attr('text-anchor', yTickTextAnchor)
187
+ .attr('dominant-baseline', yTickDominantBaseline)
188
+ // .attr('dy', 0)
189
+ .attr('x', - tickPadding)
190
+ .attr('dy', 0)
191
+ // yText.style('transform', textReverseTransform)
192
+
193
+ // // 抵消掉預設的偏移
194
+ // if (fullDataFormatter.grid.valueAxis.position === 'bottom' || fullDataFormatter.grid.valueAxis.position === 'top') {
195
+ // yText.attr('dy', 0)
196
+ // }
197
+
198
+ return yAxisSelection
199
+ }
200
+
201
+ export const createBaseYAxis: BasePluginFn<BaseYAxisContext> = (pluginName: string, {
202
+ selection,
203
+ computedData$,
204
+ fullParams$,
205
+ fullDataFormatter$,
206
+ fullChartParams$,
207
+ isCategorySeprate$,
208
+ containerPosition$,
209
+ containerSize$,
210
+ // layout$,
211
+ // filteredXYMinMaxData$,
212
+ yScale$,
213
+ // xyMinMax$
214
+ }) => {
215
+
216
+ const destroy$ = new Subject()
217
+
218
+ // const containerClassName = getClassName(pluginName, 'container')
219
+ const yAxisGClassName = getClassName(pluginName, 'yAxisG')
220
+ const yAxisClassName = getClassName(pluginName, 'yAxis')
221
+ const yLabelClassName = getClassName(pluginName, 'yLabel')
222
+
223
+ const containerSelection$ = multiValueContainerSelectionsObservable({
224
+ selection,
225
+ pluginName,
226
+ clipPathID: null,
227
+ computedData$,
228
+ containerPosition$,
229
+ isCategorySeprate$,
230
+ }).pipe(
231
+ takeUntil(destroy$),
232
+ )
233
+
234
+ // const containerSelection$ = combineLatest({
235
+ // computedData: computedData$.pipe(
236
+ // distinctUntilChanged((a, b) => {
237
+ // // 只有當series的數量改變時,才重新計算
238
+ // return a.length === b.length
239
+ // }),
240
+ // ),
241
+ // isCategorySeprate: isCategorySeprate$
242
+ // }).pipe(
243
+ // takeUntil(destroy$),
244
+ // switchMap(async (d) => d),
245
+ // map(data => {
246
+ // return data.isCategorySeprate
247
+ // // category分開的時候顯示各別axis
248
+ // ? data.computedData
249
+ // // category合併的時候只顯示第一個axis
250
+ // : [data.computedData[0]]
251
+ // }),
252
+ // map((computedData, i) => {
253
+ // return selection
254
+ // .selectAll<SVGGElement, ComputedDatumMultiValue[]>(`g.${containerClassName}`)
255
+ // .data(computedData, d => d[0] ? d[0].categoryIndex : i)
256
+ // .join('g')
257
+ // .classed(containerClassName, true)
258
+ // })
259
+ // )
260
+
261
+ const axisSelection$ = containerSelection$.pipe(
262
+ takeUntil(destroy$),
263
+ map((containerSelection, i) => {
264
+ return containerSelection
265
+ .selectAll<SVGGElement, ComputedDatumMultiValue[]>(`g.${yAxisGClassName}`)
266
+ .data([yAxisGClassName])
267
+ .join('g')
268
+ .classed(yAxisGClassName, true)
269
+ })
270
+ )
271
+
272
+ // combineLatest({
273
+ // containerSelection: containerSelection$,
274
+ // gridContainerPosition: containerPosition$
275
+ // }).pipe(
276
+ // takeUntil(destroy$),
277
+ // switchMap(async d => d)
278
+ // ).subscribe(data => {
279
+ // data.containerSelection
280
+ // .attr('transform', (d, i) => {
281
+ // const gridContainerPosition = data.gridContainerPosition[i] ?? data.gridContainerPosition[0]
282
+ // const translate = gridContainerPosition.translate
283
+ // const scale = gridContainerPosition.scale
284
+ // // return `translate(${translate[0]}, ${translate[1]}) scale(${scale[0]}, ${scale[1]})`
285
+ // return `translate(${translate[0]}, ${translate[1]})`
286
+ // })
287
+ // // .attr('opacity', 0)
288
+ // // .transition()
289
+ // // .attr('opacity', 1)
290
+ // })
291
+
292
+ // const textReverseTransform$ = containerPosition$.pipe(
293
+ // takeUntil(destroy$),
294
+ // switchMap(async (d) => d),
295
+ // map(containerPosition => {
296
+ // // const axesRotateXYReverseValue = `rotateX(${data.gridAxesReverseTransform.rotateX}deg) rotateY(${data.gridAxesReverseTransform.rotateY}deg)`
297
+ // // const axesRotateReverseValue = `rotate(${data.gridAxesReverseTransform.rotate}deg)`
298
+ // const containerScaleReverseValue = `scale(${1 / containerPosition[0].scale[0]}, ${1 / containerPosition[0].scale[1]})`
299
+ // // 抵消最外層scale
300
+ // return `${containerScaleReverseValue}`
301
+ // }),
302
+ // distinctUntilChanged()
303
+ // )
304
+
305
+ // const yScale$: Observable<d3.ScaleLinear<number, number>> = new Observable(subscriber => {
306
+ // combineLatest({
307
+ // fullDataFormatter: fullDataFormatter$,
308
+ // layout: layout$,
309
+ // // xyMinMax: observer.xyMinMax$
310
+ // filteredXYMinMaxData: filteredXYMinMaxData$
311
+ // }).pipe(
312
+ // takeUntil(destroy$),
313
+ // switchMap(async (d) => d),
314
+ // ).subscribe(data => {
315
+ // const valueIndex = data.fullDataFormatter.xAxis.valueIndex
316
+ // if (!data.filteredXYMinMaxData.minYDatum || !data.filteredXYMinMaxData.maxYDatum
317
+ // || data.filteredXYMinMaxData.minYDatum.value[valueIndex] == null || data.filteredXYMinMaxData.maxYDatum.value[valueIndex] == null
318
+ // ) {
319
+ // return
320
+ // }
321
+ // let maxValue = data.filteredXYMinMaxData.maxYDatum.value[valueIndex]
322
+ // let minValue = data.filteredXYMinMaxData.minYDatum.value[valueIndex]
323
+ // if (maxValue === minValue && maxValue === 0) {
324
+ // // 避免最大及最小值同等於 0 造成無法計算scale
325
+ // maxValue = 1
326
+ // }
327
+
328
+ // const yScale: d3.ScaleLinear<number, number> = createValueToAxisScale({
329
+ // maxValue,
330
+ // minValue,
331
+ // axisWidth: data.layout.height,
332
+ // scaleDomain: data.fullDataFormatter.yAxis.scaleDomain,
333
+ // scaleRange: data.fullDataFormatter.yAxis.scaleRange,
334
+ // reverse: true
335
+ // })
336
+
337
+ // subscriber.next(yScale)
338
+ // })
339
+ // })
340
+
341
+
342
+ combineLatest({
343
+ axisSelection: axisSelection$,
344
+ fullParams: fullParams$,
345
+ // tickTextAlign: tickTextAlign$,
346
+ // axisLabelAlign: axisLabelAlign$,
347
+ computedData: computedData$,
348
+ containerSize: containerSize$,
349
+ fullDataFormatter: fullDataFormatter$,
350
+ fullChartParams: fullChartParams$,
351
+ yScale: yScale$,
352
+ // textReverseTransform: textReverseTransform$,
353
+ // xyMinMax: xyMinMax$
354
+ }).pipe(
355
+ takeUntil(destroy$),
356
+ switchMap(async (d) => d),
357
+ ).subscribe(data => {
358
+
359
+ renderYAxis({
360
+ selection: data.axisSelection,
361
+ yAxisClassName,
362
+ fullParams: data.fullParams,
363
+ // tickTextAlign: data.tickTextAlign,
364
+ containerSize: data.containerSize,
365
+ fullDataFormatter: data.fullDataFormatter,
366
+ fullChartParams: data.fullChartParams,
367
+ yScale: data.yScale,
368
+ // textReverseTransform: data.textReverseTransform,
369
+ // xyMinMax: data.xyMinMax
370
+ })
371
+
372
+ renderYAxisLabel({
373
+ selection: data.axisSelection,
374
+ yLabelClassName,
375
+ fullParams: data.fullParams,
376
+ // axisLabelAlign: data.axisLabelAlign,
377
+ containerSize: data.containerSize,
378
+ fullDataFormatter: data.fullDataFormatter,
379
+ fullChartParams: data.fullChartParams,
380
+ // textReverseTransform: data.textReverseTransform,
381
+ })
382
+
383
+ })
384
+
385
+
386
+ return () => {
387
+ destroy$.next(undefined)
388
+ }
389
+ }
@@ -4,13 +4,13 @@ import type {
4
4
  GroupAuxParams,
5
5
  DotsParams,
6
6
  BarsParams,
7
- StackedBarParams,
7
+ StackedBarsParams,
8
8
  BarsTriangleParams,
9
9
  GroupAxisParams,
10
10
  ValueAxisParams,
11
11
  StackedValueAxisParams,
12
12
  GridTooltipParams,
13
- GridZoomParams,
13
+ GroupZoomParams,
14
14
  GridLegendParams
15
15
  } from '../../lib/plugins-basic-types'
16
16
  // import { measureTextWidth } from '../utils/commonUtils'
@@ -59,7 +59,7 @@ export const DEFAULT_BARS_DIVERGING_PARAMS: BarsParams = {
59
59
  ...DEFAULT_BARS_PARAMS
60
60
  }
61
61
 
62
- export const DEFAULT_STACKED_BAR_PARAMS: StackedBarParams = {
62
+ export const DEFAULT_STACKED_BAR_PARAMS: StackedBarsParams = {
63
63
  barWidth: 0,
64
64
  barGroupPadding: 10,
65
65
  barRadius: false,
@@ -113,13 +113,11 @@ export const DEFAULT_STACKED_VALUE_AXIS_PARAMS: StackedValueAxisParams = {
113
113
  ...DEFAULT_VALUE_AXIS_PARAMS
114
114
  }
115
115
 
116
- export const DEFAULT_GRID_ZOOM_PARAMS: GridZoomParams = {
116
+ export const DEFAULT_GRID_ZOOM_PARAMS: GroupZoomParams = {
117
117
 
118
118
  }
119
119
 
120
120
  export const DEFAULT_GRID_LEGEND_PARAMS: GridLegendParams = {
121
- // position: 'right',
122
- // justify: 'end',
123
121
  placement: 'bottom',
124
122
  padding: 28,
125
123
  // offset: [0, 0],
@@ -140,56 +138,6 @@ export const DEFAULT_GRID_TOOLTIP_PARAMS: GridTooltipParams = {
140
138
  textColorType: 'primary',
141
139
  offset: [20, 5],
142
140
  padding: 10,
143
- // renderFn: (eventData, { styles }) => {
144
- // const bulletWidth = styles.textSizePx * 0.7
145
- // const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
146
- // if (eventData.highlightTarget === 'group') {
147
- // const titleSvg = `<g><text dominant-baseline="hanging" font-size="${styles.textSizePx}">${eventData.groupLabel}</text></g>`
148
- // const maxLengthText = eventData.group.reduce((acc, group) => {
149
- // const text = `${group.seriesLabel}${group.value}`
150
- // return text.length > acc.length ? text : acc
151
- // }, '')
152
- // const maxTextWidth = measureTextWidth(maxLengthText, styles.textSizePx)
153
- // const lineEndX = maxTextWidth + styles.textSizePx * 2
154
- // const contentSvg = eventData.group
155
- // .map((group, i) => {
156
- // const y = i * styles.textSizePx * 1.5
157
- // return `<g transform="translate(0, ${styles.textSizePx * 2})">
158
- // <rect width="${bulletWidth}" height="${bulletWidth}" x="${offset}" y="${y + offset}" rx="${bulletWidth / 2}" fill="${group.color}"></rect>
159
- // <text x="${styles.textSizePx * 1.5}" y="${y}" font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">
160
- // <tspan>${group.seriesLabel}</tspan>
161
- // <tspan font-weight="bold" text-anchor="end" x="${lineEndX}">${group.value}</tspan>
162
- // </text>
163
- // </g>`
164
- // })
165
- // .join('')
166
- // return `${titleSvg}
167
- // ${contentSvg}`
168
- // } else if (eventData.highlightTarget === 'series') {
169
- // const titleSvg = `<g><text dominant-baseline="hanging" font-size="${styles.textSizePx}">${eventData.groupLabel}</text></g>`
170
- // const textWidth = measureTextWidth(`${eventData.seriesLabel}${eventData.datum.value}`, styles.textSizePx)
171
- // const lineEndX = textWidth + styles.textSizePx * 2
172
- // const contentSvg = `<g transform="translate(0, ${styles.textSizePx * 2})">
173
- // <rect width="${bulletWidth}" height="${bulletWidth}" x="${offset}" y="${offset}" rx="${bulletWidth / 2}" fill="${eventData.datum.color}"></rect>
174
- // <text x="${styles.textSizePx * 1.5}" font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">
175
- // <tspan>${eventData.seriesLabel}</tspan>
176
- // <tspan font-weight="bold" text-anchor="end" x="${lineEndX}">${eventData.datum.value}</tspan>
177
- // </text>
178
- // </g>`
179
- // return `${titleSvg}
180
- // ${contentSvg}`
181
- // } else {
182
- // const textWidth = measureTextWidth(`${eventData.datum.label}${eventData.datum.value}`, styles.textSizePx)
183
- // const lineEndX = textWidth + styles.textSizePx * 2
184
- // return `<g>
185
- // <rect width="${bulletWidth}" height="${bulletWidth}" x="${offset}" y="${offset}" rx="${bulletWidth / 2}" fill="${eventData.datum.color}"></rect>
186
- // <text x="${styles.textSizePx * 1.5}" font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">
187
- // <tspan>${eventData.datum.label}</tspan>
188
- // <tspan font-weight="bold" text-anchor="end" x="${lineEndX}">${eventData.datum.value}</tspan>
189
- // </text>
190
- // </g>`
191
- // }
192
- // },
193
141
  renderFn: (eventData, { styles, utils }) => {
194
142
  const bulletWidth = styles.textSizePx * 0.7
195
143
  const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
@@ -154,6 +154,64 @@ export const gridSelectionsObservable = ({ selection, pluginName, clipPathID, se
154
154
  }
155
155
  }
156
156
 
157
+ // 建立 grid 主要的 selection - 只取的container
158
+ export const gridContainerSelectionsObservable = ({ selection, pluginName, computedData$, gridContainerPosition$, isSeriesSeprate$ }: {
159
+ selection: d3.Selection<any, unknown, any, unknown>
160
+ pluginName: string
161
+ computedData$: Observable<ComputedDataGrid>
162
+ gridContainerPosition$: Observable<ContainerPositionScaled[]>
163
+ isSeriesSeprate$: Observable<boolean>
164
+ }) => {
165
+ const containerClassName = getClassName(pluginName, 'container')
166
+
167
+ const containerSelection$ = combineLatest({
168
+ computedData: computedData$.pipe(
169
+ distinctUntilChanged((a, b) => {
170
+ // 只有當series的數量改變時,才重新計算
171
+ return a.length === b.length
172
+ }),
173
+ ),
174
+ isSeriesSeprate: isSeriesSeprate$
175
+ }).pipe(
176
+ switchMap(async (d) => d),
177
+ map(data => {
178
+ return data.isSeriesSeprate
179
+ // series分開的時候顯示各別axis
180
+ ? data.computedData
181
+ // series合併的時候只顯示第一個axis
182
+ : [data.computedData[0]]
183
+ }),
184
+ map((computedData, i) => {
185
+ return selection
186
+ .selectAll<SVGGElement, ComputedDatumGrid[]>(`g.${containerClassName}`)
187
+ .data(computedData, d => d[0] ? d[0].seriesIndex : i)
188
+ .join('g')
189
+ .classed(containerClassName, true)
190
+ }),
191
+ shareReplay(1)
192
+ )
193
+
194
+ combineLatest({
195
+ containerSelection: containerSelection$,
196
+ gridContainerPosition: gridContainerPosition$
197
+ }).pipe(
198
+ switchMap(async d => d)
199
+ ).subscribe(data => {
200
+ data.containerSelection
201
+ .attr('transform', (d, i) => {
202
+ const gridContainerPosition = data.gridContainerPosition[i] ?? data.gridContainerPosition[0]
203
+ const translate = gridContainerPosition.translate
204
+ const scale = gridContainerPosition.scale
205
+ return `translate(${translate[0]}, ${translate[1]}) scale(${scale[0]}, ${scale[1]})`
206
+ })
207
+ // .attr('opacity', 0)
208
+ // .transition()
209
+ // .attr('opacity', 1)
210
+ })
211
+
212
+ return containerSelection$
213
+ }
214
+
157
215
  // 由事件取得group data的function
158
216
  export const gridGroupPositionFnObservable = ({ fullDataFormatter$, gridAxesSize$, computedData$, fullChartParams$, gridContainerPosition$, layout$ }: {
159
217
  fullDataFormatter$: Observable<DataFormatterGrid>
package/src/grid/index.ts CHANGED
@@ -4,7 +4,7 @@ export { Lines } from './plugins/Lines'
4
4
  export { LineAreas } from './plugins/LineAreas'
5
5
  export { Bars } from './plugins/Bars'
6
6
  export { BarsPN } from './plugins/BarsPN'
7
- export { StackedBar } from './plugins/StackedBar'
7
+ export { StackedBars } from './plugins/StackedBars'
8
8
  export { BarsTriangle } from './plugins/BarsTriangle'
9
9
  export { Dots } from './plugins/Dots'
10
10
  export { GridLegend } from './plugins/GridLegend'
@@ -12,5 +12,5 @@ export { GroupAxis } from './plugins/GroupAxis'
12
12
  export { ValueAxis } from './plugins/ValueAxis'
13
13
  export { StackedValueAxis } from './plugins/StackedValueAxis'
14
14
  export { GridTooltip } from './plugins/GridTooltip'
15
- export { GridZoom } from './plugins/GridZoom'
15
+ export { GroupZoom } from './plugins/GroupZoom'
16
16
  export { GroupAux } from './plugins/GroupAux'
@@ -44,9 +44,9 @@ export const Bars = defineGridPlugin(pluginConfig)(({ selection, name, subject,
44
44
  const unsubscribeBaseBars = createBaseBars(pluginName, {
45
45
  selection,
46
46
  computedData$: observer.computedData$,
47
- computedLayoutData$: observer.computedLayoutData$,
47
+ computedAxesData$: observer.computedAxesData$,
48
48
  visibleComputedData$: observer.visibleComputedData$,
49
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
49
+ visibleComputedAxesData$: observer.visibleComputedAxesData$,
50
50
  seriesLabels$: observer.seriesLabels$,
51
51
  SeriesDataMap$: observer.SeriesDataMap$,
52
52
  GroupDataMap$: observer.GroupDataMap$,
@@ -40,9 +40,9 @@ export const BarsPN = defineGridPlugin(pluginConfig)(({ selection, name, subject
40
40
  const unsubscribeBaseBars = createBaseBars(pluginName, {
41
41
  selection,
42
42
  computedData$: observer.computedData$,
43
- computedLayoutData$: observer.computedLayoutData$,
43
+ computedAxesData$: observer.computedAxesData$,
44
44
  visibleComputedData$: observer.visibleComputedData$,
45
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
45
+ visibleComputedAxesData$: observer.visibleComputedAxesData$,
46
46
  seriesLabels$: observer.seriesLabels$,
47
47
  SeriesDataMap$: observer.SeriesDataMap$,
48
48
  GroupDataMap$: observer.GroupDataMap$,
@@ -49,9 +49,9 @@ export const BarsTriangle = defineGridPlugin(pluginConfig)(({ selection, name, s
49
49
  const unsubscribeBaseBars = createBaseBarsTriangle(pluginName, {
50
50
  selection,
51
51
  computedData$: observer.computedData$,
52
- computedLayoutData$: observer.computedLayoutData$,
52
+ computedAxesData$: observer.computedAxesData$,
53
53
  visibleComputedData$: observer.visibleComputedData$,
54
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
54
+ visibleComputedAxesData$: observer.visibleComputedAxesData$,
55
55
  fullDataFormatter$: observer.fullDataFormatter$,
56
56
  seriesLabels$: observer.seriesLabels$,
57
57
  SeriesDataMap$: observer.SeriesDataMap$,
@@ -45,9 +45,9 @@ export const Dots = defineGridPlugin(pluginConfig)(({ selection, name, subject,
45
45
  const unsubscribeBaseBars = createBaseDots(pluginName, {
46
46
  selection,
47
47
  computedData$: observer.computedData$,
48
- computedLayoutData$: observer.computedLayoutData$,
48
+ computedAxesData$: observer.computedAxesData$,
49
49
  visibleComputedData$: observer.visibleComputedData$,
50
- visibleComputedLayoutData$: observer.visibleComputedLayoutData$,
50
+ visibleComputedAxesData$: observer.visibleComputedAxesData$,
51
51
  seriesLabels$: observer.seriesLabels$,
52
52
  SeriesDataMap$: observer.SeriesDataMap$,
53
53
  GroupDataMap$: observer.GroupDataMap$,
@@ -65,12 +65,12 @@ export const GridLegend = defineGridPlugin(pluginConfig)(({ selection, rootSelec
65
65
 
66
66
  const destroy$ = new Subject()
67
67
 
68
- const seriesLabels$: Observable<string[]> = observer.SeriesDataMap$.pipe(
69
- takeUntil(destroy$),
70
- map(data => {
71
- return Array.from(data.keys())
72
- })
73
- )
68
+ // const seriesLabels$: Observable<string[]> = observer.SeriesDataMap$.pipe(
69
+ // takeUntil(destroy$),
70
+ // map(data => {
71
+ // return Array.from(data.keys())
72
+ // })
73
+ // )
74
74
 
75
75
  // 全部列點矩型使用相同樣式參數
76
76
  const fullParams$ = observer.fullParams$.pipe(
@@ -92,7 +92,7 @@ export const GridLegend = defineGridPlugin(pluginConfig)(({ selection, rootSelec
92
92
 
93
93
  const unsubscribeBaseLegend = createBaseLegend(pluginName, {
94
94
  rootSelection,
95
- legendLabels$: seriesLabels$,
95
+ legendLabels$: observer.seriesLabels$,
96
96
  fullParams$,
97
97
  layout$: observer.layout$,
98
98
  fullChartParams$: observer.fullChartParams$,
@@ -44,30 +44,6 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_GROUP_A
44
44
  return value === null || value === 'all' || typeof value === 'number'
45
45
  }
46
46
  },
47
- tickFormat: {
48
- toBeTypes: ['string', 'Function']
49
- },
50
- tickLineVisible: {
51
- toBeTypes: ['boolean']
52
- },
53
- tickPadding: {
54
- toBeTypes: ['number']
55
- },
56
- tickFullLine: {
57
- toBeTypes: ['boolean']
58
- },
59
- tickFullLineDasharray: {
60
- toBeTypes: ['string']
61
- },
62
- tickColorType: {
63
- toBeOption: 'ColorType',
64
- },
65
- tickTextRotate: {
66
- toBeTypes: ['number']
67
- },
68
- tickTextColorType: {
69
- toBeOption: 'ColorType',
70
- }
71
47
  })
72
48
  return result
73
49
  }