@orbcharts/plugins-basic 3.0.0-beta.1 → 3.0.0-beta.11
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.
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBars.d.ts +2 -2
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseBarsTriangle.d.ts +2 -2
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseDots.d.ts +2 -2
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseGroupAxis.d.ts +2 -2
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLegend.d.ts +1 -1
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLineAreas.d.ts +3 -3
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseLines.d.ts +3 -3
- package/dist/{src/base/BaseBarStack.d.ts → orbcharts-plugins-basic/src/base/BaseStackedBar.d.ts} +6 -6
- package/dist/{src → orbcharts-plugins-basic/src}/base/BaseValueAxis.d.ts +3 -2
- package/dist/{src → orbcharts-plugins-basic/src}/grid/defaults.d.ts +4 -4
- package/dist/{src → orbcharts-plugins-basic/src}/grid/gridObservables.d.ts +5 -5
- package/dist/{src → orbcharts-plugins-basic/src}/grid/index.d.ts +2 -2
- package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedBar.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedValueAxis.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/index.d.ts +7 -0
- package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/defaults.d.ts +4 -4
- package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/index.d.ts +3 -3
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedBar.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedValueAxis.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/OverlappingStackedValueAxes.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/defaults.d.ts +9 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/index.d.ts +8 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/multiValueObservables.d.ts +33 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueLegend.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/MultiValueTooltip.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/Scatter.d.ts +3 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/ScatterBubbles.d.ts +3 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAux.d.ts +3 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYAxes.d.ts +3 -0
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYZoom.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/relationship/defaults.d.ts +6 -0
- package/dist/orbcharts-plugins-basic/src/relationship/index.d.ts +5 -0
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirected.d.ts +3 -0
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/ForceDirectedBubbles.d.ts +3 -0
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipLegend.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/relationship/plugins/RelationshipTooltip.d.ts +1 -0
- package/dist/orbcharts-plugins-basic/src/relationship/relationshipObservables.d.ts +1 -0
- package/dist/{src → orbcharts-plugins-basic/src}/series/seriesObservables.d.ts +3 -3
- package/dist/{src → orbcharts-plugins-basic/src}/utils/commonUtils.d.ts +1 -1
- package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Utils.d.ts +2 -2
- package/dist/{src → orbcharts-plugins-basic/src}/utils/observables.d.ts +1 -1
- package/dist/{src → orbcharts-plugins-basic/src}/utils/orbchartsUtils.d.ts +3 -3
- package/dist/orbcharts-plugins-basic.es.js +13327 -10361
- package/dist/orbcharts-plugins-basic.umd.js +99 -49
- package/dist/src/index.d.ts +1 -5
- package/package.json +4 -4
- package/src/base/BaseBars.ts +5 -5
- package/src/base/BaseBarsTriangle.ts +6 -4
- package/src/base/BaseDots.ts +3 -54
- package/src/base/BaseGroupAxis.ts +50 -50
- package/src/base/BaseLegend.ts +25 -21
- package/src/base/BaseLineAreas.ts +4 -4
- package/src/base/BaseLines.ts +3 -3
- package/src/base/{BaseBarStack.ts → BaseStackedBar.ts} +22 -20
- package/src/base/BaseTooltip.ts +5 -2
- package/src/base/BaseValueAxis.ts +84 -81
- package/src/grid/defaults.ts +15 -13
- package/src/grid/gridObservables.ts +56 -47
- package/src/grid/index.ts +2 -2
- package/src/grid/plugins/GridLegend.ts +2 -2
- package/src/grid/plugins/GridZoom.ts +20 -20
- package/src/grid/plugins/GroupAux.ts +216 -211
- package/src/grid/plugins/{BarStack.ts → StackedBar.ts} +7 -7
- package/src/grid/plugins/{ValueStackAxis.ts → StackedValueAxis.ts} +6 -5
- package/src/grid/plugins/ValueAxis.ts +1 -0
- package/src/index.ts +2 -5
- package/src/multiGrid/defaults.ts +11 -11
- package/src/multiGrid/index.ts +3 -3
- package/src/multiGrid/plugins/MultiBars.ts +1 -1
- package/src/multiGrid/plugins/MultiBarsTriangle.ts +1 -1
- package/src/multiGrid/plugins/MultiGridLegend.ts +2 -2
- package/src/multiGrid/plugins/MultiGroupAxis.ts +1 -1
- package/src/multiGrid/plugins/{MultiBarStack.ts → MultiStackedBar.ts} +8 -8
- package/src/multiGrid/plugins/{MultiValueStackAxis.ts → MultiStackedValueAxis.ts} +4 -3
- package/src/multiGrid/plugins/MultiValueAxis.ts +2 -1
- package/src/multiGrid/plugins/{OverlappingValueStackAxes.ts → OverlappingStackedValueAxes.ts} +9 -8
- package/src/multiGrid/plugins/OverlappingValueAxes.ts +4 -3
- package/src/multiValue/defaults.ts +167 -0
- package/src/multiValue/index.ts +9 -0
- package/src/multiValue/multiValueObservables.ts +297 -0
- package/src/multiValue/plugins/MultiValueLegend.ts +107 -0
- package/src/multiValue/plugins/MultiValueTooltip.ts +66 -0
- package/src/multiValue/plugins/Scatter.ts +426 -0
- package/src/multiValue/plugins/ScatterBubbles.ts +554 -0
- package/src/multiValue/plugins/XYAux.ts +682 -0
- package/src/multiValue/plugins/XYAxes.ts +685 -0
- package/src/multiValue/plugins/XYZoom.ts +300 -0
- package/src/noneData/plugins/Container.ts +23 -23
- package/src/noneData/plugins/Tooltip.ts +365 -365
- package/src/relationship/defaults.ts +197 -0
- package/src/relationship/index.ts +5 -0
- package/src/relationship/plugins/ForceDirected.ts +1169 -0
- package/src/relationship/plugins/ForceDirectedBubbles.ts +1394 -0
- package/src/relationship/plugins/RelationshipLegend.ts +100 -0
- package/src/relationship/plugins/RelationshipTooltip.ts +66 -0
- package/src/relationship/relationshipObservables.ts +50 -0
- package/src/series/defaults.ts +13 -12
- package/src/series/plugins/Bubbles.ts +22 -22
- package/src/series/plugins/Pie.ts +2 -2
- package/src/series/plugins/PieEventTexts.ts +22 -21
- package/src/series/plugins/PieLabels.ts +2 -2
- package/src/series/plugins/Rose.ts +2 -2
- package/src/series/plugins/RoseLabels.ts +2 -2
- package/src/series/plugins/SeriesLegend.ts +4 -4
- package/src/series/seriesObservables.ts +3 -3
- package/src/tree/defaults.ts +3 -3
- package/src/tree/plugins/TreeLegend.ts +3 -10
- package/src/utils/commonUtils.ts +5 -5
- package/src/utils/d3Utils.ts +4 -3
- package/src/utils/observables.ts +2 -2
- package/src/utils/orbchartsUtils.ts +28 -12
- package/dist/src/grid/plugins/BarStack.d.ts +0 -1
- package/dist/src/grid/plugins/ValueStackAxis.d.ts +0 -1
- package/dist/src/multiGrid/plugins/MultiBarStack.d.ts +0 -1
- package/dist/src/multiGrid/plugins/MultiValueStackAxis.d.ts +0 -1
- package/dist/src/multiGrid/plugins/OverlappingValueStackAxes.d.ts +0 -1
- package/dist/src/multiValue/plugins/Scatter.d.ts +0 -0
- package/dist/src/multiValue/plugins/ScatterAxes.d.ts +0 -0
- package/dist/src/noneData/plugins/Container.d.ts +0 -1
- package/dist/src/noneData/plugins/Tooltip.d.ts +0 -3
- package/dist/src/relationship/index.d.ts +0 -0
- package/dist/src/relationship/plugins/Relationship.d.ts +0 -0
- package/src/base/BaseGroupArea.ts +0 -0
- package/src/multiValue/plugins/ScatterAxes.ts +0 -0
- package/src/relationship/plugins/Relationship.ts +0 -0
- /package/dist/{lib → orbcharts-plugins-basic/lib}/core-types.d.ts +0 -0
- /package/dist/{lib → orbcharts-plugins-basic/lib}/core.d.ts +0 -0
- /package/dist/{lib → orbcharts-plugins-basic/lib}/plugins-basic-types.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/base/BaseTooltip.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/base/types.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/const.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Bars.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsPN.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/BarsTriangle.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Dots.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridLegend.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridTooltip.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GridZoom.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAux.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/GroupAxis.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/LineAreas.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/Lines.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/grid/plugins/ValueAxis.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/multiGridObservables.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBars.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiBarsTriangle.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiDots.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGridLegend.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGridTooltip.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiGroupAxis.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiLineAreas.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiLines.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/MultiValueAxis.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/multiGrid/plugins/OverlappingValueAxes.d.ts +0 -0
- /package/dist/{src/grid → orbcharts-plugins-basic/src/multiValue}/plugins/Ranking.d.ts +0 -0
- /package/dist/{src/grid → orbcharts-plugins-basic/src/multiValue}/plugins/RankingAxis.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/noneData/defaults.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/noneData/index.d.ts +0 -0
- /package/dist/{src/base/BaseGroupArea.d.ts → orbcharts-plugins-basic/src/noneData/plugins/Container.d.ts} +0 -0
- /package/dist/{src/multiValue/index.d.ts → orbcharts-plugins-basic/src/noneData/plugins/Tooltip.d.ts} +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/defaults.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/index.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Bubbles.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Pie.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieEventTexts.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/PieLabels.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Rose.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/RoseLabels.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/SeriesLegend.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/SeriesTooltip.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/plugins/Waffle.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/series/seriesUtils.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/tree/defaults.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/tree/index.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeLegend.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeMap.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/tree/plugins/TreeTooltip.d.ts +0 -0
- /package/dist/{src → orbcharts-plugins-basic/src}/utils/d3Graphics.d.ts +0 -0
- /package/dist/{vite.config.d.ts → orbcharts-plugins-basic/vite.config.d.ts} +0 -0
- /package/src/{grid → multiValue}/plugins/Ranking.ts +0 -0
- /package/src/{grid → multiValue}/plugins/RankingAxis.ts +0 -0
@@ -10,15 +10,15 @@ import {
|
|
10
10
|
import type { DefinePluginConfig } from '../../../lib/core-types'
|
11
11
|
import {
|
12
12
|
defineGridPlugin } from '../../../lib/core'
|
13
|
-
import {
|
13
|
+
import { DEFAULT_STACKED_VALUE_AXIS_PARAMS } from '../defaults'
|
14
14
|
import { LAYER_INDEX_OF_AXIS } from '../../const'
|
15
15
|
import { createBaseValueAxis } from '../../base/BaseValueAxis'
|
16
16
|
|
17
|
-
const pluginName = '
|
17
|
+
const pluginName = 'StackedValueAxis'
|
18
18
|
|
19
|
-
const pluginConfig: DefinePluginConfig<typeof pluginName, typeof
|
19
|
+
const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_STACKED_VALUE_AXIS_PARAMS> = {
|
20
20
|
name: pluginName,
|
21
|
-
defaultParams:
|
21
|
+
defaultParams: DEFAULT_STACKED_VALUE_AXIS_PARAMS,
|
22
22
|
layerIndex: LAYER_INDEX_OF_AXIS,
|
23
23
|
validator: (params, { validateColumns }) => {
|
24
24
|
const result = validateColumns(params, {
|
@@ -72,13 +72,14 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_VALUE_S
|
|
72
72
|
}
|
73
73
|
}
|
74
74
|
|
75
|
-
export const
|
75
|
+
export const StackedValueAxis = defineGridPlugin(pluginConfig)(({ selection, name, observer, subject }) => {
|
76
76
|
|
77
77
|
const destroy$ = new Subject()
|
78
78
|
|
79
79
|
const unsubscribeBaseValueAxis = createBaseValueAxis(pluginName, {
|
80
80
|
selection,
|
81
81
|
computedData$: observer.computedStackedData$, // 計算疊加value的資料
|
82
|
+
filteredMinMaxValue$: observer.filteredMinMaxValue$,
|
82
83
|
fullParams$: observer.fullParams$,
|
83
84
|
fullDataFormatter$: observer.fullDataFormatter$,
|
84
85
|
fullChartParams$: observer.fullChartParams$,
|
@@ -77,6 +77,7 @@ export const ValueAxis = defineGridPlugin(pluginConfig)(({ selection, name, obse
|
|
77
77
|
const unsubscribeBaseValueAxis = createBaseValueAxis(pluginName, {
|
78
78
|
selection,
|
79
79
|
computedData$: observer.computedData$,
|
80
|
+
filteredMinMaxValue$: observer.filteredMinMaxValue$,
|
80
81
|
fullParams$: observer.fullParams$,
|
81
82
|
fullDataFormatter$: observer.fullDataFormatter$,
|
82
83
|
fullChartParams$: observer.fullChartParams$,
|
package/src/index.ts
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
// export { default as container } from './noneDataPlugins/container'
|
2
|
-
// export { default as pie } from './seriesPlugins/pie'
|
3
|
-
// export { default as pieEventTexts } from './seriesPlugins/pieEventTexts'
|
4
|
-
// export { default as pieLabels } from './seriesPlugins/pieLabels'
|
5
|
-
|
6
1
|
export * from './grid'
|
7
2
|
export * from './multiGrid'
|
3
|
+
export * from './multiValue'
|
8
4
|
export * from './noneData'
|
5
|
+
export * from './relationship'
|
9
6
|
export * from './series'
|
10
7
|
export * from './tree'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type {
|
2
2
|
MultiGridLegendParams,
|
3
3
|
MultiBarsParams,
|
4
|
-
|
4
|
+
MultiStackedBarParams,
|
5
5
|
MultiBarsTriangleParams,
|
6
6
|
MultiLinesParams,
|
7
7
|
MultiLineAreasParams,
|
@@ -9,9 +9,9 @@ import type {
|
|
9
9
|
MultiGroupAxisParams,
|
10
10
|
MultiGridTooltipParams,
|
11
11
|
MultiValueAxisParams,
|
12
|
-
|
12
|
+
MultiStackedValueAxisParams,
|
13
13
|
OverlappingValueAxesParams,
|
14
|
-
|
14
|
+
OverlappingStackedValueAxesParams
|
15
15
|
} from '../../lib/plugins-basic-types'
|
16
16
|
import { measureTextWidth } from '../utils/commonUtils'
|
17
17
|
|
@@ -73,7 +73,7 @@ export const DEFAULT_MULTI_VALUE_AXIS_PARAMS: MultiValueAxisParams = {
|
|
73
73
|
gridIndexes: [0]
|
74
74
|
}
|
75
75
|
|
76
|
-
export const
|
76
|
+
export const DEFAULT_MULTI_STACKED_VALUE_AXIS_PARAMS: MultiStackedValueAxisParams = {
|
77
77
|
...DEFAULT_MULTI_VALUE_AXIS_PARAMS
|
78
78
|
}
|
79
79
|
|
@@ -85,7 +85,7 @@ export const DEFAULT_MULTI_BARS_PARAMS: MultiBarsParams = {
|
|
85
85
|
gridIndexes: [0]
|
86
86
|
}
|
87
87
|
|
88
|
-
export const
|
88
|
+
export const DEFAULT_MULTI_STACKED_BAR_PARAMS: MultiStackedBarParams = {
|
89
89
|
barWidth: 0,
|
90
90
|
barGroupPadding: 10,
|
91
91
|
barRadius: false,
|
@@ -115,7 +115,7 @@ export const DEFAULT_MULTI_LINE_AREAS_PARAMS: MultiLineAreasParams = {
|
|
115
115
|
export const DEFAULT_MULTI_DOTS_PARAMS: MultiDotsParams = {
|
116
116
|
radius: 4,
|
117
117
|
fillColorType: 'white',
|
118
|
-
strokeColorType: '
|
118
|
+
strokeColorType: 'label',
|
119
119
|
strokeWidth: 2,
|
120
120
|
onlyShowHighlighted: false,
|
121
121
|
gridIndexes: [1]
|
@@ -157,7 +157,7 @@ export const DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS: OverlappingValueAxesParams =
|
|
157
157
|
gridIndexes: [0, 1]
|
158
158
|
}
|
159
159
|
|
160
|
-
export const
|
160
|
+
export const DEFAULT_OVERLAPPING_STACKED_VALUE_AXES_PARAMS: OverlappingStackedValueAxesParams = {
|
161
161
|
...DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS
|
162
162
|
}
|
163
163
|
|
@@ -168,7 +168,7 @@ export const DEFAULT_MULTI_GRID_TOOLTIP_PARAMS: MultiGridTooltipParams = {
|
|
168
168
|
textColorType: 'primary',
|
169
169
|
offset: [20, 5],
|
170
170
|
padding: 10,
|
171
|
-
renderFn: (eventData, { styles }) => {
|
171
|
+
renderFn: (eventData, { styles, utils }) => {
|
172
172
|
const bulletWidth = styles.textSizePx * 0.7
|
173
173
|
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
174
174
|
|
@@ -177,7 +177,7 @@ export const DEFAULT_MULTI_GRID_TOOLTIP_PARAMS: MultiGridTooltipParams = {
|
|
177
177
|
const text = `${group.seriesLabel}${group.value}`
|
178
178
|
return text.length > acc.length ? text : acc
|
179
179
|
}, '')
|
180
|
-
const maxTextWidth = measureTextWidth(maxLengthText, styles.textSizePx)
|
180
|
+
const maxTextWidth = utils.measureTextWidth(maxLengthText, styles.textSizePx)
|
181
181
|
const lineEndX = maxTextWidth + styles.textSizePx * 2
|
182
182
|
const contentSvg = eventData.groups
|
183
183
|
.map((group, i) => {
|
@@ -196,7 +196,7 @@ export const DEFAULT_MULTI_GRID_TOOLTIP_PARAMS: MultiGridTooltipParams = {
|
|
196
196
|
${contentSvg}`
|
197
197
|
}
|
198
198
|
}
|
199
|
-
DEFAULT_MULTI_GRID_TOOLTIP_PARAMS.renderFn.toString = () => `(eventData, { styles }) => {
|
199
|
+
DEFAULT_MULTI_GRID_TOOLTIP_PARAMS.renderFn.toString = () => `(eventData, { styles, utils }) => {
|
200
200
|
const bulletWidth = styles.textSizePx * 0.7
|
201
201
|
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
202
202
|
|
@@ -205,7 +205,7 @@ DEFAULT_MULTI_GRID_TOOLTIP_PARAMS.renderFn.toString = () => `(eventData, { style
|
|
205
205
|
const text = \`\${group.seriesLabel}\${group.value}\`
|
206
206
|
return text.length > acc.length ? text : acc
|
207
207
|
}, '')
|
208
|
-
const maxTextWidth = measureTextWidth(maxLengthText, styles.textSizePx)
|
208
|
+
const maxTextWidth = utils.measureTextWidth(maxLengthText, styles.textSizePx)
|
209
209
|
const lineEndX = maxTextWidth + styles.textSizePx * 2
|
210
210
|
const contentSvg = eventData.groups
|
211
211
|
.map((group, i) => {
|
package/src/multiGrid/index.ts
CHANGED
@@ -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 {
|
5
|
+
export { MultiStackedBar } from './plugins/MultiStackedBar'
|
6
6
|
export { MultiBarsTriangle } from './plugins/MultiBarsTriangle'
|
7
7
|
export { MultiLines } from './plugins/MultiLines'
|
8
8
|
export { MultiLineAreas } from './plugins/MultiLineAreas'
|
@@ -10,6 +10,6 @@ export { MultiDots } from './plugins/MultiDots'
|
|
10
10
|
export { MultiGroupAxis } from './plugins/MultiGroupAxis'
|
11
11
|
export { MultiValueAxis } from './plugins/MultiValueAxis'
|
12
12
|
export { MultiGridTooltip } from './plugins/MultiGridTooltip'
|
13
|
-
export {
|
13
|
+
export { MultiStackedValueAxis } from './plugins/MultiStackedValueAxis'
|
14
14
|
export { OverlappingValueAxes } from './plugins/OverlappingValueAxes'
|
15
|
-
export {
|
15
|
+
export { OverlappingStackedValueAxes } from './plugins/OverlappingStackedValueAxes'
|
@@ -73,7 +73,7 @@ export const MultiBars = defineMultiGridPlugin(pluginConfig)(({ selection, name,
|
|
73
73
|
|
74
74
|
const isSeriesSeprate$ = d.dataFormatter$.pipe(
|
75
75
|
takeUntil(destroy$),
|
76
|
-
map(d => d.
|
76
|
+
map(d => d.separateSeries),
|
77
77
|
distinctUntilChanged(),
|
78
78
|
shareReplay(1)
|
79
79
|
)
|
@@ -79,7 +79,7 @@ export const MultiBarsTriangle = defineMultiGridPlugin(pluginConfig)(({ selectio
|
|
79
79
|
|
80
80
|
const isSeriesSeprate$ = d.dataFormatter$.pipe(
|
81
81
|
takeUntil(destroy$),
|
82
|
-
map(d => d.
|
82
|
+
map(d => d.separateSeries),
|
83
83
|
distinctUntilChanged(),
|
84
84
|
shareReplay(1)
|
85
85
|
)
|
@@ -137,14 +137,14 @@ export const MultiGridLegend = defineMultiGridPlugin(pluginConfig)(({ selection,
|
|
137
137
|
map(d => {
|
138
138
|
return {
|
139
139
|
...d.fullParams,
|
140
|
-
|
140
|
+
labelList: d.seriesList
|
141
141
|
}
|
142
142
|
})
|
143
143
|
)
|
144
144
|
|
145
145
|
const unsubscribeBaseLegend = createBaseLegend(pluginName, {
|
146
146
|
rootSelection,
|
147
|
-
seriesLabels$,
|
147
|
+
legendLabels$: seriesLabels$,
|
148
148
|
fullParams$,
|
149
149
|
layout$: observer.layout$,
|
150
150
|
fullChartParams$: observer.fullChartParams$,
|
@@ -109,7 +109,7 @@ export const MultiGroupAxis = defineMultiGridPlugin(pluginConfig)(({ selection,
|
|
109
109
|
|
110
110
|
const isSeriesSeprate$ = d.dataFormatter$.pipe(
|
111
111
|
takeUntil(destroy$),
|
112
|
-
map(d => d.
|
112
|
+
map(d => d.separateSeries),
|
113
113
|
distinctUntilChanged(),
|
114
114
|
shareReplay(1)
|
115
115
|
)
|
@@ -9,19 +9,19 @@ import {
|
|
9
9
|
import type { DefinePluginConfig } from '../../../lib/core-types'
|
10
10
|
import {
|
11
11
|
defineMultiGridPlugin } from '../../../lib/core'
|
12
|
-
import {
|
13
|
-
import {
|
12
|
+
import { DEFAULT_MULTI_STACKED_BAR_PARAMS } from '../defaults'
|
13
|
+
import { createBaseStackedBar } from '../../base/BaseStackedBar'
|
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 = '
|
18
|
+
const pluginName = 'MultiStackedBar'
|
19
19
|
|
20
20
|
const gridClassName = getClassName(pluginName, 'grid')
|
21
21
|
|
22
|
-
const pluginConfig: DefinePluginConfig<typeof pluginName, typeof
|
22
|
+
const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_MULTI_STACKED_BAR_PARAMS> = {
|
23
23
|
name: pluginName,
|
24
|
-
defaultParams:
|
24
|
+
defaultParams: DEFAULT_MULTI_STACKED_BAR_PARAMS,
|
25
25
|
layerIndex: LAYER_INDEX_OF_GRAPHIC,
|
26
26
|
validator: (params, { validateColumns }) => {
|
27
27
|
const result = validateColumns(params, {
|
@@ -45,7 +45,7 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_MULTI_B
|
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
48
|
-
export const
|
48
|
+
export const MultiStackedBar = defineMultiGridPlugin(pluginConfig)(({ selection, name, subject, observer }) => {
|
49
49
|
const destroy$ = new Subject()
|
50
50
|
|
51
51
|
const unsubscribeFnArr: (() => void)[] = []
|
@@ -70,12 +70,12 @@ export const MultiBarStack = defineMultiGridPlugin(pluginConfig)(({ selection, n
|
|
70
70
|
|
71
71
|
const isSeriesSeprate$ = d.dataFormatter$.pipe(
|
72
72
|
takeUntil(destroy$),
|
73
|
-
map(d => d.
|
73
|
+
map(d => d.separateSeries),
|
74
74
|
distinctUntilChanged(),
|
75
75
|
shareReplay(1)
|
76
76
|
)
|
77
77
|
|
78
|
-
unsubscribeFnArr[i] =
|
78
|
+
unsubscribeFnArr[i] = createBaseStackedBar(pluginName, {
|
79
79
|
selection: gridSelection,
|
80
80
|
computedData$: d.computedData$,
|
81
81
|
visibleComputedData$: d.visibleComputedData$,
|
@@ -15,7 +15,7 @@ import { multiGridPluginDetailObservables } from '../multiGridObservables'
|
|
15
15
|
import { getClassName, getUniID } from '../../utils/orbchartsUtils'
|
16
16
|
import { LAYER_INDEX_OF_AXIS } from '../../const'
|
17
17
|
|
18
|
-
const pluginName = '
|
18
|
+
const pluginName = 'MultiStackedValueAxis'
|
19
19
|
|
20
20
|
const gridClassName = getClassName(pluginName, 'grid')
|
21
21
|
|
@@ -81,7 +81,7 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_MULTI_V
|
|
81
81
|
}
|
82
82
|
}
|
83
83
|
|
84
|
-
export const
|
84
|
+
export const MultiStackedValueAxis = defineMultiGridPlugin(pluginConfig)(({ selection, name, subject, observer }) => {
|
85
85
|
const destroy$ = new Subject()
|
86
86
|
|
87
87
|
const unsubscribeFnArr: (() => void)[] = []
|
@@ -106,7 +106,7 @@ export const MultiValueStackAxis = defineMultiGridPlugin(pluginConfig)(({ select
|
|
106
106
|
|
107
107
|
const isSeriesSeprate$ = d.dataFormatter$.pipe(
|
108
108
|
takeUntil(destroy$),
|
109
|
-
map(d => d.
|
109
|
+
map(d => d.separateSeries),
|
110
110
|
distinctUntilChanged(),
|
111
111
|
shareReplay(1)
|
112
112
|
)
|
@@ -114,6 +114,7 @@ export const MultiValueStackAxis = defineMultiGridPlugin(pluginConfig)(({ select
|
|
114
114
|
unsubscribeFnArr[i] = createBaseValueAxis(pluginName, {
|
115
115
|
selection: gridSelection,
|
116
116
|
computedData$: d.computedStackedData$, // 計算疊加value的資料
|
117
|
+
filteredMinMaxValue$: d.filteredMinMaxValue$,
|
117
118
|
fullParams$: observer.fullParams$,
|
118
119
|
fullDataFormatter$: d.dataFormatter$,
|
119
120
|
fullChartParams$: observer.fullChartParams$,
|
@@ -106,7 +106,7 @@ export const MultiValueAxis = defineMultiGridPlugin(pluginConfig)(({ selection,
|
|
106
106
|
|
107
107
|
const isSeriesSeprate$ = d.dataFormatter$.pipe(
|
108
108
|
takeUntil(destroy$),
|
109
|
-
map(d => d.
|
109
|
+
map(d => d.separateSeries),
|
110
110
|
distinctUntilChanged(),
|
111
111
|
shareReplay(1)
|
112
112
|
)
|
@@ -114,6 +114,7 @@ export const MultiValueAxis = defineMultiGridPlugin(pluginConfig)(({ selection,
|
|
114
114
|
unsubscribeFnArr[i] = createBaseValueAxis(pluginName, {
|
115
115
|
selection: gridSelection,
|
116
116
|
computedData$: d.computedData$,
|
117
|
+
filteredMinMaxValue$: d.filteredMinMaxValue$,
|
117
118
|
fullParams$: observer.fullParams$,
|
118
119
|
fullDataFormatter$: d.dataFormatter$,
|
119
120
|
fullChartParams$: observer.fullChartParams$,
|
package/src/multiGrid/plugins/{OverlappingValueStackAxes.ts → OverlappingStackedValueAxes.ts}
RENAMED
@@ -14,20 +14,20 @@ import type { DefinePluginConfig } from '../../../lib/core-types'
|
|
14
14
|
import type { ContextObserverMultiGrid, DataFormatterGrid, DataFormatterTypeMap, Layout } from '../../../lib/core-types'
|
15
15
|
import {
|
16
16
|
defineMultiGridPlugin } from '../../../lib/core'
|
17
|
-
import {
|
17
|
+
import { DEFAULT_OVERLAPPING_STACKED_VALUE_AXES_PARAMS } from '../defaults'
|
18
18
|
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
22
|
import { LAYER_INDEX_OF_AXIS } from '../../const'
|
23
23
|
|
24
|
-
const pluginName = '
|
24
|
+
const pluginName = 'OverlappingStackedValueAxes'
|
25
25
|
|
26
26
|
const gridClassName = getClassName(pluginName, 'grid')
|
27
27
|
|
28
|
-
const pluginConfig: DefinePluginConfig<typeof pluginName, typeof
|
28
|
+
const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_OVERLAPPING_STACKED_VALUE_AXES_PARAMS> = {
|
29
29
|
name: pluginName,
|
30
|
-
defaultParams:
|
30
|
+
defaultParams: DEFAULT_OVERLAPPING_STACKED_VALUE_AXES_PARAMS,
|
31
31
|
layerIndex: LAYER_INDEX_OF_AXIS,
|
32
32
|
validator: (params, { validateColumns }) => {
|
33
33
|
const result = validateColumns(params, {
|
@@ -153,7 +153,7 @@ const pluginConfig: DefinePluginConfig<typeof pluginName, typeof DEFAULT_OVERLAP
|
|
153
153
|
}
|
154
154
|
|
155
155
|
// 第一個圖軸使用堆疊的資料,第二個圖軸使用原始資料
|
156
|
-
export const
|
156
|
+
export const OverlappingStackedValueAxes = defineMultiGridPlugin(pluginConfig)(({ selection, name, subject, observer }) => {
|
157
157
|
const destroy$ = new Subject()
|
158
158
|
|
159
159
|
const unsubscribeFnArr: (() => void)[] = []
|
@@ -195,13 +195,13 @@ export const OverlappingValueStackAxes = defineMultiGridPlugin(pluginConfig)(({
|
|
195
195
|
return <DataFormatterGrid>{
|
196
196
|
type: 'grid',
|
197
197
|
visibleFilter: data.fullDataFormatter.visibleFilter as any,
|
198
|
-
grid: {
|
198
|
+
// grid: {
|
199
199
|
...data.fullDataFormatter.gridList[data.secondGridIndex],
|
200
200
|
valueAxis: {
|
201
201
|
...data.fullDataFormatter.gridList[data.secondGridIndex].valueAxis,
|
202
202
|
position: reversePosition
|
203
|
-
}
|
204
|
-
},
|
203
|
+
},
|
204
|
+
// },
|
205
205
|
container: {
|
206
206
|
...data.fullDataFormatter.container
|
207
207
|
}
|
@@ -277,6 +277,7 @@ export const OverlappingValueStackAxes = defineMultiGridPlugin(pluginConfig)(({
|
|
277
277
|
unsubscribeFnArr[i] = createBaseValueAxis(pluginName, {
|
278
278
|
selection: gridSelection,
|
279
279
|
computedData$: i === 0 ? d.computedStackedData$ : d.computedData$, // 第一個圖軸計算疊加value的資料
|
280
|
+
filteredMinMaxValue$: d.filteredMinMaxValue$,
|
280
281
|
fullParams$: observer.fullParams$.pipe(
|
281
282
|
map(fullParams => i === 0 ? fullParams.firstAxis : fullParams.secondAxis)
|
282
283
|
),
|
@@ -196,13 +196,13 @@ export const OverlappingValueAxes = defineMultiGridPlugin(pluginConfig)(({ selec
|
|
196
196
|
return <DataFormatterGrid>{
|
197
197
|
type: 'grid',
|
198
198
|
visibleFilter: data.fullDataFormatter.visibleFilter as any,
|
199
|
-
grid: {
|
199
|
+
// grid: {
|
200
200
|
...data.fullDataFormatter.gridList[data.secondGridIndex],
|
201
201
|
valueAxis: {
|
202
202
|
...data.fullDataFormatter.gridList[data.secondGridIndex].valueAxis,
|
203
203
|
position: reversePosition
|
204
|
-
}
|
205
|
-
},
|
204
|
+
},
|
205
|
+
// },
|
206
206
|
container: {
|
207
207
|
...data.fullDataFormatter.container
|
208
208
|
}
|
@@ -278,6 +278,7 @@ export const OverlappingValueAxes = defineMultiGridPlugin(pluginConfig)(({ selec
|
|
278
278
|
unsubscribeFnArr[i] = createBaseValueAxis(pluginName, {
|
279
279
|
selection: gridSelection,
|
280
280
|
computedData$: d.computedData$,
|
281
|
+
filteredMinMaxValue$: d.filteredMinMaxValue$,
|
281
282
|
fullParams$: observer.fullParams$.pipe(
|
282
283
|
map(fullParams => i === 0 ? fullParams.firstAxis : fullParams.secondAxis)
|
283
284
|
),
|
@@ -0,0 +1,167 @@
|
|
1
|
+
import type {
|
2
|
+
MultiValueLegendParams,
|
3
|
+
MultiValueTooltipParams,
|
4
|
+
ScatterParams,
|
5
|
+
ScatterBubblesParams,
|
6
|
+
XYAuxParams,
|
7
|
+
XYAxesParams,
|
8
|
+
XYZoomParams
|
9
|
+
} from '../../lib/plugins-basic-types'
|
10
|
+
|
11
|
+
|
12
|
+
export const DEFAULT_MULTI_VALUE_LEGEND_PARAMS: MultiValueLegendParams = {
|
13
|
+
// position: 'right',
|
14
|
+
// justify: 'end',
|
15
|
+
placement: 'bottom',
|
16
|
+
padding: 28,
|
17
|
+
// offset: [0, 0],
|
18
|
+
backgroundFill: 'none',
|
19
|
+
backgroundStroke: 'none',
|
20
|
+
gap: 10,
|
21
|
+
listRectWidth: 14,
|
22
|
+
listRectHeight: 14,
|
23
|
+
listRectRadius: 0,
|
24
|
+
// highlightEvent: false
|
25
|
+
textColorType: 'primary'
|
26
|
+
}
|
27
|
+
|
28
|
+
export const DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS: MultiValueTooltipParams = {
|
29
|
+
backgroundColorType: 'background',
|
30
|
+
strokeColorType: 'primary',
|
31
|
+
backgroundOpacity: 0.8,
|
32
|
+
textColorType: 'primary',
|
33
|
+
offset: [20, 5],
|
34
|
+
padding: 10,
|
35
|
+
renderFn: (eventData, { styles, utils }) => {
|
36
|
+
const hasCategoryLabel = eventData.categoryLabel === '' ? false : true
|
37
|
+
const hasDatumLabel = eventData.datum.label.slice(0, 11) === 'multiValue_' ? false : true
|
38
|
+
const bulletWidth = styles.textSizePx * 0.7
|
39
|
+
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
40
|
+
const categorySvg = hasCategoryLabel
|
41
|
+
? `<rect width="${bulletWidth}" height="${bulletWidth}" x="${offset}" y="${offset - 1}" rx="${bulletWidth / 2}" fill="${eventData.datum.color}"></rect>
|
42
|
+
<text x="${styles.textSizePx * 1.5}" font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">
|
43
|
+
<tspan>${eventData.categoryLabel}</tspan>
|
44
|
+
</text>`
|
45
|
+
: ''
|
46
|
+
const datumLabelSvg = hasDatumLabel
|
47
|
+
? `<tspan>${eventData.datum.label}</tspan> `
|
48
|
+
: ''
|
49
|
+
const datumSvg = `<text font-size="${styles.textSizePx}" dominant-baseline="hanging" fill="${styles.textColor}">
|
50
|
+
${datumLabelSvg}<tspan font-weight="bold">${eventData.datum.value}</tspan>
|
51
|
+
</text>`
|
52
|
+
|
53
|
+
return `${categorySvg}
|
54
|
+
<g ${hasCategoryLabel ? `transform="translate(0, ${styles.textSizePx * 2})"` : ''}>
|
55
|
+
${datumSvg}
|
56
|
+
</g>`
|
57
|
+
},
|
58
|
+
}
|
59
|
+
DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS.renderFn.toString = () => `(eventData, { styles, utils }) => {
|
60
|
+
const hasCategoryLabel = eventData.categoryLabel === '' ? false : true
|
61
|
+
const hasDatumLabel = eventData.datum.label.slice(0, 11) === 'multiValue_' ? false : true
|
62
|
+
const bulletWidth = styles.textSizePx * 0.7
|
63
|
+
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
64
|
+
const categorySvg = hasCategoryLabel
|
65
|
+
? \`<rect width="\${bulletWidth}" height="\${bulletWidth}" x="\${offset}" y="\${offset - 1}" rx="\${bulletWidth / 2}" fill="\${eventData.datum.color}"></rect>
|
66
|
+
<text x="\${styles.textSizePx * 1.5}" font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
67
|
+
<tspan>\${eventData.categoryLabel}</tspan>
|
68
|
+
</text>\`
|
69
|
+
: ''
|
70
|
+
const datumLabelSvg = hasDatumLabel
|
71
|
+
? \`<tspan>\${eventData.datum.label}</tspan> \`
|
72
|
+
: ''
|
73
|
+
const datumSvg = \`<text font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
74
|
+
\${datumLabelSvg}<tspan font-weight="bold">\${eventData.datum.value}</tspan>
|
75
|
+
</text>\`
|
76
|
+
|
77
|
+
return \`\${categorySvg}
|
78
|
+
<g \${hasCategoryLabel ? \`transform="translate(0, \${styles.textSizePx * 2})"\` : ''}>
|
79
|
+
\${datumSvg}
|
80
|
+
</g>\`
|
81
|
+
}`
|
82
|
+
|
83
|
+
export const DEFAULT_SCATTER_PARAMS: ScatterParams = {
|
84
|
+
radius: 5,
|
85
|
+
fillColorType: 'label',
|
86
|
+
strokeColorType: 'label',
|
87
|
+
strokeWidth: 0,
|
88
|
+
}
|
89
|
+
|
90
|
+
export const DEFAULT_SCATTER_BUBBLES_PARAMS: ScatterBubblesParams = {
|
91
|
+
// radius: 5,
|
92
|
+
fillColorType: 'label',
|
93
|
+
strokeColorType: 'label',
|
94
|
+
strokeWidth: 0,
|
95
|
+
valueLinearOpacity: [0.8, 0.8],
|
96
|
+
arcScaleType: 'area',
|
97
|
+
sizeAdjust: 0.5
|
98
|
+
}
|
99
|
+
|
100
|
+
export const DEFAULT_X_Y_AUX_PARAMS: XYAuxParams = {
|
101
|
+
xAxis: {
|
102
|
+
showLine: true,
|
103
|
+
showLabel: true,
|
104
|
+
lineDashArray: '3, 3',
|
105
|
+
lineColorType: 'primary',
|
106
|
+
labelColorType: 'primary',
|
107
|
+
labelTextColorType: 'background',
|
108
|
+
// labelTextFormat: text => text,
|
109
|
+
labelTextFormat: (value: number) => String(Math.round(value)),
|
110
|
+
labelPadding: 20,
|
111
|
+
// labelRotate: 0
|
112
|
+
},
|
113
|
+
yAxis: {
|
114
|
+
showLine: true,
|
115
|
+
showLabel: true,
|
116
|
+
lineDashArray: '3, 3',
|
117
|
+
lineColorType: 'primary',
|
118
|
+
labelColorType: 'primary',
|
119
|
+
labelTextColorType: 'background',
|
120
|
+
// labelTextFormat: text => text,
|
121
|
+
labelTextFormat: (value: number) => String(Math.round(value)),
|
122
|
+
labelPadding: 20,
|
123
|
+
// labelRotate: 0
|
124
|
+
}
|
125
|
+
}
|
126
|
+
DEFAULT_X_Y_AUX_PARAMS.xAxis.labelTextFormat.toString = () => `(value: number) => String(Math.round(value))`
|
127
|
+
DEFAULT_X_Y_AUX_PARAMS.yAxis.labelTextFormat.toString = () => `(value: number) => String(Math.round(value))`
|
128
|
+
|
129
|
+
|
130
|
+
export const DEFAULT_X_Y_AXES_PARAMS: XYAxesParams = {
|
131
|
+
xAxis: {
|
132
|
+
labelOffset: [0, 0],
|
133
|
+
labelColorType: 'primary',
|
134
|
+
axisLineVisible: false,
|
135
|
+
axisLineColorType: 'primary',
|
136
|
+
ticks: null,
|
137
|
+
// tickFormat: ',.0f',
|
138
|
+
tickFormat: v => v,
|
139
|
+
tickLineVisible: true,
|
140
|
+
tickPadding: 20,
|
141
|
+
tickFullLine: true,
|
142
|
+
tickFullLineDasharray: 'none',
|
143
|
+
tickColorType: 'secondary',
|
144
|
+
tickTextColorType: 'primary'
|
145
|
+
},
|
146
|
+
yAxis: {
|
147
|
+
labelOffset: [0, 0],
|
148
|
+
labelColorType: 'primary',
|
149
|
+
axisLineVisible: false,
|
150
|
+
axisLineColorType: 'primary',
|
151
|
+
ticks: null,
|
152
|
+
// tickFormat: ',.0f',
|
153
|
+
tickFormat: v => v,
|
154
|
+
tickLineVisible: true,
|
155
|
+
tickPadding: 20,
|
156
|
+
tickFullLine: true,
|
157
|
+
tickFullLineDasharray: 'none',
|
158
|
+
tickColorType: 'secondary',
|
159
|
+
tickTextColorType: 'primary'
|
160
|
+
}
|
161
|
+
}
|
162
|
+
DEFAULT_X_Y_AXES_PARAMS.xAxis.tickFormat.toString = () => `v => v`
|
163
|
+
DEFAULT_X_Y_AXES_PARAMS.yAxis.tickFormat.toString = () => `v => v`
|
164
|
+
|
165
|
+
export const DEFAULT_X_Y_ZOOM_PARAMS: XYZoomParams = {
|
166
|
+
|
167
|
+
}
|
package/src/multiValue/index.ts
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
export * from './defaults'
|
2
|
+
// export * from './types'
|
3
|
+
export { MultiValueLegend } from './plugins/MultiValueLegend'
|
4
|
+
export { MultiValueTooltip } from './plugins/MultiValueTooltip'
|
5
|
+
export { Scatter } from './plugins/Scatter'
|
6
|
+
export { ScatterBubbles } from './plugins/ScatterBubbles'
|
7
|
+
export { XYAux } from './plugins/XYAux'
|
8
|
+
export { XYAxes } from './plugins/XYAxes'
|
9
|
+
export { XYZoom } from './plugins/XYZoom'
|