@tsingroc/tsingroc-components 5.0.0-alpha.16 → 5.0.0-alpha.17
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.
|
@@ -226,14 +226,21 @@ export const withSelectable = ECharts => function SelectableECharts(props) {
|
|
|
226
226
|
if (inputSeries) {
|
|
227
227
|
const series = {
|
|
228
228
|
...inputSeries,
|
|
229
|
-
showSymbol:
|
|
229
|
+
showSymbol: selectedIndices.size > 0,
|
|
230
230
|
markArea: {
|
|
231
|
+
itemStyle: {
|
|
232
|
+
...DEFAULT_MARK_AREA_STYLE,
|
|
233
|
+
...markAreaStyle
|
|
234
|
+
},
|
|
235
|
+
emphasis: {
|
|
236
|
+
disabled: true
|
|
237
|
+
},
|
|
231
238
|
data: []
|
|
232
239
|
}
|
|
233
240
|
};
|
|
234
|
-
if (selectedIndices.size > 0 || mode === "add" && mouseState?.end) {
|
|
241
|
+
if (inputSeries.data && (selectedIndices.size > 0 || mode === "add" && mouseState?.end)) {
|
|
235
242
|
const allSelectedIndices = new Set();
|
|
236
|
-
series.data = inputSeries.data
|
|
243
|
+
series.data = inputSeries.data.map((point_1, i_2) => {
|
|
237
244
|
const destructured_1 = destructureLineDataItem(point_1, i_2);
|
|
238
245
|
if (destructured_1 == null) {
|
|
239
246
|
return point_1;
|
|
@@ -269,39 +276,28 @@ export const withSelectable = ECharts => function SelectableECharts(props) {
|
|
|
269
276
|
if (markArea) {
|
|
270
277
|
debugAssert(markAreaWidth !== undefined, "when markArea === true, markAreaWidth is guaranteed to be defined at the beginning of this function");
|
|
271
278
|
const markAreas = [];
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
continue;
|
|
282
|
-
}
|
|
283
|
-
markAreas.push([{
|
|
284
|
-
coord: [xValue - markAreaWidth / 2]
|
|
285
|
-
}, {
|
|
286
|
-
coord: [xValue + markAreaWidth / 2]
|
|
287
|
-
}]);
|
|
279
|
+
for (const i_3 of allSelectedIndices) {
|
|
280
|
+
const destructured_2 = destructureLineDataItem(inputSeries.data[i_3], i_3);
|
|
281
|
+
if (destructured_2 == null) {
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
const [t6] = destructured_2;
|
|
285
|
+
const [xValue] = t6;
|
|
286
|
+
if (typeof xValue !== "number") {
|
|
287
|
+
continue;
|
|
288
288
|
}
|
|
289
|
+
markAreas.push([{
|
|
290
|
+
coord: [xValue - markAreaWidth / 2]
|
|
291
|
+
}, {
|
|
292
|
+
coord: [xValue + markAreaWidth / 2]
|
|
293
|
+
}]);
|
|
289
294
|
}
|
|
290
|
-
series.markArea =
|
|
291
|
-
itemStyle: {
|
|
292
|
-
...DEFAULT_MARK_AREA_STYLE,
|
|
293
|
-
...markAreaStyle
|
|
294
|
-
},
|
|
295
|
-
emphasis: {
|
|
296
|
-
disabled: true
|
|
297
|
-
},
|
|
298
|
-
data: markAreas
|
|
299
|
-
};
|
|
295
|
+
series.markArea.data = markAreas;
|
|
300
296
|
}
|
|
301
|
-
const seriesArray = [...inputSeriesArray];
|
|
302
|
-
seriesArray[seriesArray.indexOf(inputSeries)] = series;
|
|
303
|
-
option.series = seriesArray;
|
|
304
297
|
}
|
|
298
|
+
const seriesArray = [...inputSeriesArray];
|
|
299
|
+
seriesArray[seriesArray.indexOf(inputSeries)] = series;
|
|
300
|
+
option.series = seriesArray;
|
|
305
301
|
}
|
|
306
302
|
let t6;
|
|
307
303
|
if ($[17] !== selectionBoxStyle) {
|