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