@orbcharts/plugins-basic 3.0.0-alpha.32 → 3.0.0-alpha.33
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -7,6 +7,7 @@ import {
|
|
7
7
|
Observable } from 'rxjs'
|
8
8
|
import {
|
9
9
|
defineMultiGridPlugin } from '@orbcharts/core'
|
10
|
+
import { DATA_FORMATTER_MULTI_GRID_DEFAULT } from '@orbcharts/core/src/defaults'
|
10
11
|
// import { defineMultiGridPlugin } from '../../../../orbcharts-core/src'
|
11
12
|
import { getClassName, getUniID } from '../../utils/orbchartsUtils'
|
12
13
|
import { DEFAULT_BARS_AND_LINES_PARAMS } from '../defaults'
|
@@ -40,23 +41,38 @@ export const BarsAndLines = defineMultiGridPlugin(pluginName, DEFAULT_BARS_AND_L
|
|
40
41
|
// })
|
41
42
|
|
42
43
|
const barsComputedData$ = observer.computedData$.pipe(
|
44
|
+
takeUntil(destroy$),
|
43
45
|
map((computedData) => computedData[0] || [])
|
44
46
|
)
|
45
47
|
|
46
48
|
const linesComputedData$ = observer.computedData$.pipe(
|
49
|
+
takeUntil(destroy$),
|
47
50
|
map((computedData) => computedData[1] || [])
|
48
51
|
)
|
49
52
|
|
50
53
|
const barsFullParams$ = observer.fullParams$.pipe(
|
54
|
+
takeUntil(destroy$),
|
51
55
|
map((fullParams) => fullParams.bars)
|
52
56
|
)
|
53
57
|
|
54
58
|
const linesFullParams$ = observer.fullParams$.pipe(
|
59
|
+
takeUntil(destroy$),
|
55
60
|
map((fullParams) => fullParams.lines)
|
56
61
|
)
|
57
62
|
|
58
|
-
const
|
59
|
-
|
63
|
+
const defaultFullDataFormatter$ = observer.fullDataFormatter$.pipe(
|
64
|
+
takeUntil(destroy$),
|
65
|
+
map((fullDataFormatter) => fullDataFormatter.multiGrid[0] || DATA_FORMATTER_MULTI_GRID_DEFAULT.multiGrid[0])
|
66
|
+
)
|
67
|
+
|
68
|
+
const linesFullDataFormatter$ = combineLatest({
|
69
|
+
fullDataFormatter: observer.fullDataFormatter$,
|
70
|
+
defaultFullDataFormatter: defaultFullDataFormatter$,
|
71
|
+
}).pipe(
|
72
|
+
takeUntil(destroy$),
|
73
|
+
map((data) => {
|
74
|
+
return data.fullDataFormatter.multiGrid[1] ?? data.defaultFullDataFormatter
|
75
|
+
})
|
60
76
|
)
|
61
77
|
|
62
78
|
observer.multiGrid$.subscribe((multiGrid) => {
|