@orbcharts/core 3.0.0-beta.3 → 3.0.0-beta.5
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/orbcharts-core.es.js +2665 -2376
- package/dist/orbcharts-core.umd.js +4 -4
- package/dist/src/utils/d3Scale.d.ts +28 -0
- package/dist/src/utils/gridObservables.d.ts +29 -19
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/multiGridObservables.d.ts +2 -2
- package/dist/src/utils/multiValueObservables.d.ts +73 -0
- package/dist/src/utils/orbchartsUtils.d.ts +19 -5
- package/dist/src/utils/seriesObservables.d.ts +4 -4
- package/dist/src/utils/treeObservables.d.ts +2 -5
- package/package.json +2 -2
- package/src/defaults.ts +4 -1
- package/src/grid/contextObserverCallback.ts +57 -36
- package/src/multiValue/computedDataFn.ts +81 -147
- package/src/multiValue/contextObserverCallback.ts +150 -2
- package/src/relationship/computedDataFn.ts +1 -1
- package/src/tree/computedDataFn.ts +9 -10
- package/src/tree/contextObserverCallback.ts +6 -9
- package/src/utils/d3Scale.ts +198 -0
- package/src/utils/gridObservables.ts +303 -234
- package/src/utils/index.ts +1 -1
- package/src/utils/multiGridObservables.ts +68 -42
- package/src/utils/multiValueObservables.ts +662 -0
- package/src/utils/orbchartsUtils.ts +70 -45
- package/src/utils/seriesObservables.ts +7 -7
- package/src/utils/treeObservables.ts +44 -33
- package/src/utils/validator.ts +3 -2
- package/dist/src/utils/d3Utils.d.ts +0 -19
- package/src/utils/d3Utils.ts +0 -108
@@ -23,7 +23,7 @@ import type {
|
|
23
23
|
DataFormatterGrid,
|
24
24
|
DataFormatterMultiGridContainer,
|
25
25
|
EventMultiGrid,
|
26
|
-
|
26
|
+
ContainerPositionScaled,
|
27
27
|
HighlightTarget,
|
28
28
|
Layout,
|
29
29
|
TransformData } from '../../lib/core-types'
|
@@ -32,17 +32,21 @@ import {
|
|
32
32
|
seriesDataMapObservable,
|
33
33
|
groupDataMapObservable } from './observables'
|
34
34
|
import {
|
35
|
-
|
36
|
-
gridGraphicTransformObservable,
|
37
|
-
gridGraphicReverseScaleObservable,
|
38
|
-
gridAxesReverseTransformObservable,
|
35
|
+
gridComputedLayoutDataObservable,
|
39
36
|
gridAxesSizeObservable,
|
40
37
|
gridSeriesLabelsObservable,
|
41
|
-
gridComputedLayoutDataObservable,
|
42
38
|
gridVisibleComputedDataObservable,
|
43
39
|
gridVisibleComputedLayoutDataObservable,
|
44
40
|
// isSeriesSeprateObservable,
|
45
|
-
|
41
|
+
gridContainerPositionObservable,
|
42
|
+
computedStackedDataObservables,
|
43
|
+
groupScaleDomainValueObservable,
|
44
|
+
filteredMinMaxValueObservable,
|
45
|
+
gridAxesTransformObservable,
|
46
|
+
gridAxesReverseTransformObservable,
|
47
|
+
gridGraphicTransformObservable,
|
48
|
+
gridGraphicReverseScaleObservable,
|
49
|
+
} from './gridObservables'
|
46
50
|
import { DATA_FORMATTER_MULTI_GRID_GRID_DEFAULT } from '../defaults'
|
47
51
|
import { calcGridContainerLayout } from './orbchartsUtils'
|
48
52
|
|
@@ -143,36 +147,7 @@ export const multiGridEachDetailObservable = ({ fullDataFormatter$, computedData
|
|
143
147
|
shareReplay(1)
|
144
148
|
)
|
145
149
|
|
146
|
-
const gridAxesTransform$ = gridAxesTransformObservable({
|
147
|
-
fullDataFormatter$: gridDataFormatter$,
|
148
|
-
layout$: layout$
|
149
|
-
}).pipe(
|
150
|
-
takeUntil(destroy$),
|
151
|
-
shareReplay(1)
|
152
|
-
)
|
153
|
-
|
154
|
-
|
155
|
-
const gridAxesReverseTransform$ = gridAxesReverseTransformObservable({
|
156
|
-
gridAxesTransform$
|
157
|
-
}).pipe(
|
158
|
-
takeUntil(destroy$),
|
159
|
-
shareReplay(1)
|
160
|
-
)
|
161
150
|
|
162
|
-
const gridGraphicTransform$ = gridGraphicTransformObservable({
|
163
|
-
computedData$: gridComputedData$,
|
164
|
-
fullDataFormatter$: gridDataFormatter$,
|
165
|
-
layout$: layout$
|
166
|
-
}).pipe(
|
167
|
-
takeUntil(destroy$),
|
168
|
-
shareReplay(1)
|
169
|
-
)
|
170
|
-
|
171
|
-
const gridGraphicReverseScale$ = gridGraphicReverseScaleObservable({
|
172
|
-
gridContainerPosition$: gridContainerPosition$,
|
173
|
-
gridAxesTransform$: gridAxesTransform$,
|
174
|
-
gridGraphicTransform$: gridGraphicTransform$,
|
175
|
-
})
|
176
151
|
|
177
152
|
const gridAxesSize$ = gridAxesSizeObservable({
|
178
153
|
fullDataFormatter$: gridDataFormatter$,
|
@@ -248,13 +223,58 @@ export const multiGridEachDetailObservable = ({ fullDataFormatter$, computedData
|
|
248
223
|
shareReplay(1)
|
249
224
|
)
|
250
225
|
|
226
|
+
const groupScaleDomainValue$ = groupScaleDomainValueObservable({
|
227
|
+
computedData$: gridComputedData$,
|
228
|
+
fullDataFormatter$: gridDataFormatter$,
|
229
|
+
}).pipe(
|
230
|
+
takeUntil(destroy$),
|
231
|
+
shareReplay(1)
|
232
|
+
)
|
233
|
+
|
234
|
+
const filteredMinMaxValue$ = filteredMinMaxValueObservable({
|
235
|
+
computedData$: gridComputedData$,
|
236
|
+
groupScaleDomainValue$: groupScaleDomainValue$,
|
237
|
+
}).pipe(
|
238
|
+
takeUntil(destroy$),
|
239
|
+
shareReplay(1)
|
240
|
+
)
|
241
|
+
|
242
|
+
const gridAxesTransform$ = gridAxesTransformObservable({
|
243
|
+
fullDataFormatter$: gridDataFormatter$,
|
244
|
+
layout$: layout$
|
245
|
+
}).pipe(
|
246
|
+
takeUntil(destroy$),
|
247
|
+
shareReplay(1)
|
248
|
+
)
|
249
|
+
|
250
|
+
|
251
|
+
const gridAxesReverseTransform$ = gridAxesReverseTransformObservable({
|
252
|
+
gridAxesTransform$
|
253
|
+
}).pipe(
|
254
|
+
takeUntil(destroy$),
|
255
|
+
shareReplay(1)
|
256
|
+
)
|
257
|
+
|
258
|
+
const gridGraphicTransform$ = gridGraphicTransformObservable({
|
259
|
+
computedData$: gridComputedData$,
|
260
|
+
groupScaleDomainValue$: groupScaleDomainValue$,
|
261
|
+
filteredMinMaxValue$: filteredMinMaxValue$,
|
262
|
+
fullDataFormatter$: gridDataFormatter$,
|
263
|
+
layout$: layout$
|
264
|
+
}).pipe(
|
265
|
+
takeUntil(destroy$),
|
266
|
+
shareReplay(1)
|
267
|
+
)
|
268
|
+
|
269
|
+
const gridGraphicReverseScale$ = gridGraphicReverseScaleObservable({
|
270
|
+
gridContainerPosition$: gridContainerPosition$,
|
271
|
+
gridAxesTransform$: gridAxesTransform$,
|
272
|
+
gridGraphicTransform$: gridGraphicTransform$,
|
273
|
+
})
|
274
|
+
|
251
275
|
return {
|
252
276
|
isSeriesSeprate$,
|
253
277
|
gridContainerPosition$,
|
254
|
-
gridAxesTransform$,
|
255
|
-
gridAxesReverseTransform$,
|
256
|
-
gridGraphicTransform$,
|
257
|
-
gridGraphicReverseScale$,
|
258
278
|
gridAxesSize$,
|
259
279
|
gridHighlight$: allGridHighlight$,
|
260
280
|
seriesLabels$,
|
@@ -265,7 +285,13 @@ export const multiGridEachDetailObservable = ({ fullDataFormatter$, computedData
|
|
265
285
|
computedLayoutData$,
|
266
286
|
visibleComputedData$,
|
267
287
|
visibleComputedLayoutData$,
|
268
|
-
computedStackedData
|
288
|
+
computedStackedData$,
|
289
|
+
groupScaleDomainValue$,
|
290
|
+
filteredMinMaxValue$,
|
291
|
+
gridAxesTransform$,
|
292
|
+
gridAxesReverseTransform$,
|
293
|
+
gridGraphicTransform$,
|
294
|
+
gridGraphicReverseScale$,
|
269
295
|
}
|
270
296
|
})
|
271
297
|
})
|
@@ -278,7 +304,7 @@ export const multiGridContainerObservable = ({ computedData$, fullDataFormatter$
|
|
278
304
|
computedData$: Observable<ComputedDataTypeMap<'multiGrid'>>
|
279
305
|
fullDataFormatter$: Observable<DataFormatterTypeMap<'multiGrid'>>
|
280
306
|
layout$: Observable<Layout>
|
281
|
-
}): Observable<
|
307
|
+
}): Observable<ContainerPositionScaled[][]> => {
|
282
308
|
|
283
309
|
return combineLatest({
|
284
310
|
computedData: computedData$,
|