@orbcharts/plugins-basic 3.0.0-alpha.42 → 3.0.0-alpha.43
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +200 -200
- package/dist/orbcharts-plugins-basic.es.js +5477 -5426
- package/dist/orbcharts-plugins-basic.umd.js +8 -8
- package/dist/src/base/BaseBarStack.d.ts +1 -1
- package/dist/src/base/BaseBars.d.ts +1 -1
- package/dist/src/base/BaseBarsTriangle.d.ts +1 -1
- package/dist/src/base/BaseDots.d.ts +1 -1
- package/dist/src/base/BaseLineAreas.d.ts +1 -1
- package/dist/src/base/BaseLines.d.ts +1 -1
- package/dist/src/multiGrid/defaults.d.ts +2 -1
- package/dist/src/multiGrid/index.d.ts +1 -0
- package/dist/src/multiGrid/plugins/MultiLineAreas.d.ts +1 -0
- package/dist/src/multiGrid/types.d.ts +4 -4
- package/package.json +42 -42
- package/src/base/BaseBarStack.ts +881 -879
- package/src/base/BaseBars.ts +750 -748
- package/src/base/BaseBarsTriangle.ts +659 -657
- package/src/base/BaseDots.ts +639 -637
- package/src/base/BaseGroupAxis.ts +496 -496
- package/src/base/BaseLegend.ts +636 -636
- package/src/base/BaseLineAreas.ts +621 -624
- package/src/base/BaseLines.ts +692 -695
- package/src/base/BaseValueAxis.ts +479 -479
- package/src/base/types.ts +2 -2
- package/src/grid/defaults.ts +121 -121
- package/src/grid/gridObservables.ts +263 -263
- package/src/grid/index.ts +15 -15
- package/src/grid/plugins/BarStack.ts +37 -37
- package/src/grid/plugins/Bars.ts +37 -37
- package/src/grid/plugins/BarsDiverging.ts +39 -39
- package/src/grid/plugins/BarsTriangle.ts +34 -34
- package/src/grid/plugins/Dots.ts +35 -35
- package/src/grid/plugins/GridLegend.ts +58 -58
- package/src/grid/plugins/GroupAux.ts +643 -643
- package/src/grid/plugins/GroupAxis.ts +30 -30
- package/src/grid/plugins/LineAreas.ts +36 -36
- package/src/grid/plugins/Lines.ts +35 -35
- package/src/grid/plugins/ScalingArea.ts +174 -174
- package/src/grid/plugins/ValueAxis.ts +31 -31
- package/src/grid/plugins/ValueStackAxis.ts +70 -70
- package/src/grid/types.ts +120 -120
- package/src/index.ts +9 -9
- package/src/multiGrid/defaults.ts +147 -140
- package/src/multiGrid/index.ts +11 -10
- package/src/multiGrid/multiGridObservables.ts +289 -278
- package/src/multiGrid/plugins/MultiBarStack.ts +60 -60
- package/src/multiGrid/plugins/MultiBars.ts +59 -59
- package/src/multiGrid/plugins/MultiBarsTriangle.ts +58 -58
- package/src/multiGrid/plugins/MultiDots.ts +58 -58
- package/src/multiGrid/plugins/MultiGridLegend.ts +88 -88
- package/src/multiGrid/plugins/MultiGroupAxis.ts +53 -53
- package/src/multiGrid/plugins/MultiLineAreas.ts +59 -0
- package/src/multiGrid/plugins/MultiLines.ts +58 -58
- package/src/multiGrid/plugins/MultiValueAxis.ts +53 -53
- package/src/multiGrid/plugins/OverlappingValueAxes.ts +164 -165
- package/src/multiGrid/types.ts +67 -67
- package/src/noneData/defaults.ts +61 -61
- package/src/noneData/index.ts +3 -3
- package/src/noneData/plugins/Container.ts +10 -10
- package/src/noneData/plugins/Tooltip.ts +304 -304
- package/src/noneData/types.ts +26 -26
- package/src/series/defaults.ts +99 -99
- package/src/series/index.ts +6 -6
- package/src/series/plugins/Bubbles.ts +551 -549
- package/src/series/plugins/Pie.ts +600 -598
- package/src/series/plugins/PieEventTexts.ts +194 -194
- package/src/series/plugins/PieLabels.ts +288 -285
- package/src/series/plugins/SeriesLegend.ts +58 -58
- package/src/series/seriesUtils.ts +50 -50
- package/src/series/types.ts +67 -67
- package/src/tree/defaults.ts +22 -22
- package/src/tree/index.ts +3 -3
- package/src/tree/plugins/TreeLegend.ts +58 -58
- package/src/tree/plugins/TreeMap.ts +302 -300
- package/src/tree/types.ts +23 -23
- package/src/utils/commonUtils.ts +21 -21
- package/src/utils/d3Graphics.ts +124 -124
- package/src/utils/d3Utils.ts +73 -73
- package/src/utils/observables.ts +14 -14
- package/src/utils/orbchartsUtils.ts +100 -100
- package/tsconfig.dev.json +16 -16
- package/tsconfig.json +13 -13
- package/tsconfig.prod.json +13 -13
- package/vite.config.js +49 -49
@@ -1,285 +1,288 @@
|
|
1
|
-
import * as d3 from 'd3'
|
2
|
-
import {
|
3
|
-
combineLatest,
|
4
|
-
switchMap,
|
5
|
-
first,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
import type {
|
15
|
-
import {
|
16
|
-
import {
|
17
|
-
import {
|
18
|
-
import {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
const
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
const [
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
//
|
55
|
-
let update
|
56
|
-
|
57
|
-
.
|
58
|
-
|
59
|
-
|
60
|
-
.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
labelSelection
|
68
|
-
|
69
|
-
.attr('
|
70
|
-
.
|
71
|
-
|
72
|
-
.style('
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
.text(d =>
|
77
|
-
.
|
78
|
-
.attr('
|
79
|
-
.
|
80
|
-
.
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
//
|
89
|
-
//
|
90
|
-
//
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
//
|
97
|
-
//
|
98
|
-
//
|
99
|
-
//
|
100
|
-
//
|
101
|
-
//
|
102
|
-
//
|
103
|
-
//
|
104
|
-
//
|
105
|
-
//
|
106
|
-
//
|
107
|
-
// fullChartParams
|
108
|
-
//
|
109
|
-
//
|
110
|
-
// }
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
.
|
123
|
-
.
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
.
|
137
|
-
.
|
138
|
-
.
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
.
|
145
|
-
.
|
146
|
-
.
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
}
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
//
|
156
|
-
//
|
157
|
-
//
|
158
|
-
//
|
159
|
-
//
|
160
|
-
|
161
|
-
|
162
|
-
//
|
163
|
-
//
|
164
|
-
// .
|
165
|
-
// .
|
166
|
-
//
|
167
|
-
//
|
168
|
-
//
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
let
|
180
|
-
|
181
|
-
// let
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
.
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
//
|
205
|
-
//
|
206
|
-
//
|
207
|
-
//
|
208
|
-
//
|
209
|
-
//
|
210
|
-
//
|
211
|
-
//
|
212
|
-
//
|
213
|
-
//
|
214
|
-
//
|
215
|
-
//
|
216
|
-
//
|
217
|
-
//
|
218
|
-
//
|
219
|
-
//
|
220
|
-
//
|
221
|
-
//
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
).
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
1
|
+
import * as d3 from 'd3'
|
2
|
+
import {
|
3
|
+
combineLatest,
|
4
|
+
switchMap,
|
5
|
+
first,
|
6
|
+
map,
|
7
|
+
takeUntil,
|
8
|
+
Subject,
|
9
|
+
BehaviorSubject } from 'rxjs'
|
10
|
+
import {
|
11
|
+
defineSeriesPlugin } from '@orbcharts/core'
|
12
|
+
import type {
|
13
|
+
ChartParams } from '@orbcharts/core'
|
14
|
+
import type { PieLabelsParams } from '../types'
|
15
|
+
import type { PieDatum } from '../seriesUtils'
|
16
|
+
import { DEFAULT_PIE_LABELS_PARAMS } from '../defaults'
|
17
|
+
import { makePieData } from '../seriesUtils'
|
18
|
+
import { makeD3Arc } from '../../utils/d3Utils'
|
19
|
+
import { getDatumColor, getClassName } from '../../utils/orbchartsUtils'
|
20
|
+
|
21
|
+
interface RenderDatum {
|
22
|
+
pieDatum: PieDatum
|
23
|
+
arcIndex: number
|
24
|
+
arcLabel: string
|
25
|
+
x: number
|
26
|
+
y: number
|
27
|
+
mouseoverX: number
|
28
|
+
mouseoverY: number
|
29
|
+
}
|
30
|
+
|
31
|
+
const pluginName = 'PieLabels'
|
32
|
+
const textClassName = getClassName(pluginName, 'text')
|
33
|
+
|
34
|
+
function makeRenderData (pieData: PieDatum[], arc: d3.Arc<any, d3.DefaultArcObject>, mouseoverArc: d3.Arc<any, d3.DefaultArcObject>, centroid: number): RenderDatum[] {
|
35
|
+
return pieData
|
36
|
+
.map((d, i) => {
|
37
|
+
const [_x, _y] = arc!.centroid(d as any)
|
38
|
+
const [_mouseoverX, _mouseoverY] = mouseoverArc!.centroid(d as any)
|
39
|
+
return {
|
40
|
+
pieDatum: d,
|
41
|
+
arcIndex: i,
|
42
|
+
arcLabel: d.data.label,
|
43
|
+
x: _x * centroid!,
|
44
|
+
y: _y * centroid!,
|
45
|
+
mouseoverX: _mouseoverX * centroid!,
|
46
|
+
mouseoverY: _mouseoverY * centroid!
|
47
|
+
}
|
48
|
+
})
|
49
|
+
.filter(d => d.pieDatum.data.visible)
|
50
|
+
}
|
51
|
+
|
52
|
+
// 繪製圓餅圖
|
53
|
+
function renderLabel (selection: d3.Selection<SVGGElement, undefined, any, any>, data: RenderDatum[], pluginParams: PieLabelsParams, fullChartParams: ChartParams) {
|
54
|
+
// console.log(data)
|
55
|
+
// let update = this.gSelection.selectAll('g').data(pieData)
|
56
|
+
let update: d3.Selection<SVGPathElement, RenderDatum, any, any> = selection
|
57
|
+
.selectAll<SVGPathElement, RenderDatum>('text')
|
58
|
+
.data(data, d => d.pieDatum.id)
|
59
|
+
let enter = update.enter()
|
60
|
+
.append<SVGPathElement>('text')
|
61
|
+
.classed(textClassName, true)
|
62
|
+
let exit = update.exit()
|
63
|
+
|
64
|
+
enter
|
65
|
+
.append('text')
|
66
|
+
|
67
|
+
const labelSelection = update.merge(enter)
|
68
|
+
labelSelection
|
69
|
+
.attr('font-weight', 'bold')
|
70
|
+
.attr('text-anchor', 'middle')
|
71
|
+
.style('dominant-baseline', 'middle')
|
72
|
+
// .style('pointer-events', 'none')
|
73
|
+
.style('cursor', d => fullChartParams.highlightTarget && fullChartParams.highlightTarget != 'none'
|
74
|
+
? 'pointer'
|
75
|
+
: 'none')
|
76
|
+
// .text((d, i) => d.arcLabel)
|
77
|
+
.text(d => pluginParams.labelFn(d.pieDatum.data))
|
78
|
+
.attr('font-size', fullChartParams.styles.textSize)
|
79
|
+
.attr('fill', (d, i) => getDatumColor({ datum: d.pieDatum.data, colorType: pluginParams.labelColorType, fullChartParams }))
|
80
|
+
.transition()
|
81
|
+
.attr('transform', (d) => {
|
82
|
+
// console.log('transform', d)
|
83
|
+
return 'translate(' + d.x + ',' + d.y + ')'
|
84
|
+
})
|
85
|
+
// .on('end', () => initHighlight({ labelSelection, data, fullChartParams }))
|
86
|
+
exit.remove()
|
87
|
+
|
88
|
+
// 如無新增資料則不用等動畫
|
89
|
+
// if (enter.size() == 0) {
|
90
|
+
// this.initHighlight()
|
91
|
+
// }
|
92
|
+
|
93
|
+
return labelSelection
|
94
|
+
}
|
95
|
+
|
96
|
+
// function initHighlight ({ labelSelection, data, fullChartParams }: {
|
97
|
+
// labelSelection: (d3.Selection<SVGPathElement, RenderDatum, any, any>)
|
98
|
+
// data: RenderDatum[]
|
99
|
+
// fullChartParams: ChartParams
|
100
|
+
// }) {
|
101
|
+
// removeHighlight({ labelSelection })
|
102
|
+
// // if (fullParams.highlightSeriesId || fullParams.highlightDatumId) {
|
103
|
+
// highlight({
|
104
|
+
// labelSelection,
|
105
|
+
// data,
|
106
|
+
// id: fullChartParams.highlightDefault,
|
107
|
+
// label: fullChartParams.highlightDefault,
|
108
|
+
// fullChartParams
|
109
|
+
// })
|
110
|
+
// // }
|
111
|
+
// }
|
112
|
+
|
113
|
+
function highlight ({ labelSelection, ids, fullChartParams }: {
|
114
|
+
labelSelection: (d3.Selection<SVGPathElement, RenderDatum, any, any>)
|
115
|
+
ids: string[]
|
116
|
+
fullChartParams: ChartParams
|
117
|
+
}) {
|
118
|
+
labelSelection.interrupt('highlight')
|
119
|
+
|
120
|
+
if (!ids.length) {
|
121
|
+
labelSelection
|
122
|
+
.transition()
|
123
|
+
.duration(200)
|
124
|
+
.attr('transform', (d) => {
|
125
|
+
return 'translate(' + d.x + ',' + d.y + ')'
|
126
|
+
})
|
127
|
+
.style('opacity', 1)
|
128
|
+
return
|
129
|
+
}
|
130
|
+
|
131
|
+
labelSelection.each((d, i, n) => {
|
132
|
+
const segment = d3.select<SVGPathElement, RenderDatum>(n[i])
|
133
|
+
|
134
|
+
if (ids.includes(d.pieDatum.id)) {
|
135
|
+
segment
|
136
|
+
.style('opacity', 1)
|
137
|
+
.transition()
|
138
|
+
.duration(200)
|
139
|
+
.attr('transform', (d) => {
|
140
|
+
return 'translate(' + d.mouseoverX + ',' + d.mouseoverY + ')'
|
141
|
+
})
|
142
|
+
} else {
|
143
|
+
segment
|
144
|
+
.style('opacity', fullChartParams.styles.unhighlightedOpacity)
|
145
|
+
.transition()
|
146
|
+
.duration(200)
|
147
|
+
.attr('transform', (d) => {
|
148
|
+
return 'translate(' + d.x + ',' + d.y + ')'
|
149
|
+
})
|
150
|
+
}
|
151
|
+
})
|
152
|
+
}
|
153
|
+
|
154
|
+
|
155
|
+
// function removeHighlight ({ labelSelection }: {
|
156
|
+
// labelSelection: (d3.Selection<SVGPathElement, RenderDatum, any, any> | undefined)
|
157
|
+
// }) {
|
158
|
+
// if (!labelSelection) {
|
159
|
+
// return
|
160
|
+
// }
|
161
|
+
|
162
|
+
// // 取消放大
|
163
|
+
// labelSelection
|
164
|
+
// .transition()
|
165
|
+
// .duration(200)
|
166
|
+
// .attr('transform', (d) => {
|
167
|
+
// return 'translate(' + d.x + ',' + d.y + ')'
|
168
|
+
// })
|
169
|
+
// .style('opacity', 1)
|
170
|
+
|
171
|
+
// }
|
172
|
+
|
173
|
+
|
174
|
+
export const PieLabels = defineSeriesPlugin(pluginName, DEFAULT_PIE_LABELS_PARAMS)(({ selection, observer, subject }) => {
|
175
|
+
|
176
|
+
const destroy$ = new Subject()
|
177
|
+
|
178
|
+
const graphicSelection: d3.Selection<SVGGElement, any, any, any> = selection.append('g')
|
179
|
+
let labelSelection$: Subject<d3.Selection<SVGPathElement, RenderDatum, any, any>> = new Subject()
|
180
|
+
let renderData: RenderDatum[] = []
|
181
|
+
// let highlightTarget: HighlightTarget | undefined
|
182
|
+
// let fullChartParams: ChartParams | undefined
|
183
|
+
|
184
|
+
observer.layout$
|
185
|
+
.pipe(
|
186
|
+
first()
|
187
|
+
)
|
188
|
+
.subscribe(size => {
|
189
|
+
selection
|
190
|
+
.attr('transform', `translate(${size.width / 2}, ${size.height / 2})`)
|
191
|
+
observer.layout$
|
192
|
+
.pipe(
|
193
|
+
takeUntil(destroy$)
|
194
|
+
)
|
195
|
+
.subscribe(size => {
|
196
|
+
selection
|
197
|
+
.transition()
|
198
|
+
.attr('transform', `translate(${size.width / 2}, ${size.height / 2})`)
|
199
|
+
})
|
200
|
+
})
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
// combineLatest({
|
205
|
+
// event: store.event$,
|
206
|
+
// fullChartParams: fullChartParams$
|
207
|
+
// }).pipe(
|
208
|
+
// // 轉換後會退訂前一個未完成的訂閱事件,因此可以取到「同時間」最後一次的訂閱事件
|
209
|
+
// switchMap(async (d) => d),
|
210
|
+
// ).subscribe(d => {
|
211
|
+
// if (d.event.eventName === 'mouseover' && d.event.datum) {
|
212
|
+
// highlight({
|
213
|
+
// labelSelection,
|
214
|
+
// data: renderData,
|
215
|
+
// id: d.fullChartParams.highlightTarget === 'datum' ? d.event.datum!.id : undefined,
|
216
|
+
// label: d.fullChartParams.highlightTarget === 'series' ? d.event.datum!.label : undefined,
|
217
|
+
// fullChartParams: d.fullChartParams
|
218
|
+
// })
|
219
|
+
// } else if (d.event.eventName === 'mouseout') {
|
220
|
+
// removeHighlight({ labelSelection })
|
221
|
+
// }
|
222
|
+
// })
|
223
|
+
|
224
|
+
combineLatest({
|
225
|
+
layout: observer.layout$,
|
226
|
+
computedData: observer.computedData$,
|
227
|
+
fullParams: observer.fullParams$,
|
228
|
+
fullChartParams: observer.fullChartParams$
|
229
|
+
}).pipe(
|
230
|
+
takeUntil(destroy$),
|
231
|
+
// 轉換後會退訂前一個未完成的訂閱事件,因此可以取到「同時間」最後一次的訂閱事件
|
232
|
+
switchMap(async (d) => d),
|
233
|
+
).subscribe(data => {
|
234
|
+
|
235
|
+
const shorterSideWith = data.layout.width < data.layout.height ? data.layout.width : data.layout.height
|
236
|
+
|
237
|
+
// 弧產生器 (d3.arc())
|
238
|
+
const arc = makeD3Arc({
|
239
|
+
axisWidth: shorterSideWith,
|
240
|
+
innerRadius: 0,
|
241
|
+
outerRadius: data.fullParams.outerRadius,
|
242
|
+
padAngle: 0,
|
243
|
+
cornerRadius: 0
|
244
|
+
})
|
245
|
+
|
246
|
+
const arcMouseover = makeD3Arc({
|
247
|
+
axisWidth: shorterSideWith,
|
248
|
+
innerRadius: 0,
|
249
|
+
outerRadius: data.fullParams.outerMouseoverRadius, // 外半徑變化
|
250
|
+
padAngle: 0,
|
251
|
+
cornerRadius: 0
|
252
|
+
})
|
253
|
+
|
254
|
+
const pieData = makePieData({
|
255
|
+
computedDataSeries: data.computedData,
|
256
|
+
startAngle: data.fullParams.startAngle,
|
257
|
+
endAngle: data.fullParams.endAngle
|
258
|
+
})
|
259
|
+
|
260
|
+
renderData = makeRenderData(pieData, arc, arcMouseover, data.fullParams.labelCentroid)
|
261
|
+
|
262
|
+
const labelSelection = renderLabel(graphicSelection, renderData, data.fullParams, data.fullChartParams)
|
263
|
+
|
264
|
+
labelSelection$.next(labelSelection)
|
265
|
+
|
266
|
+
})
|
267
|
+
|
268
|
+
combineLatest({
|
269
|
+
labelSelection: labelSelection$,
|
270
|
+
highlight: observer.seriesHighlight$.pipe(
|
271
|
+
map(data => data.map(d => d.id))
|
272
|
+
),
|
273
|
+
fullChartParams: observer.fullChartParams$,
|
274
|
+
}).pipe(
|
275
|
+
takeUntil(destroy$),
|
276
|
+
switchMap(async d => d)
|
277
|
+
).subscribe(data => {
|
278
|
+
highlight({
|
279
|
+
labelSelection: data.labelSelection,
|
280
|
+
ids: data.highlight,
|
281
|
+
fullChartParams: data.fullChartParams,
|
282
|
+
})
|
283
|
+
})
|
284
|
+
|
285
|
+
return () => {
|
286
|
+
destroy$.next(undefined)
|
287
|
+
}
|
288
|
+
})
|