@tsingroc/tsingroc-components 5.0.0-alpha.16 → 5.0.0-alpha.18
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: false,
|
|
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
|
-
|
|
243
|
+
const 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;
|
|
@@ -266,10 +273,12 @@ export const withSelectable = ECharts => function SelectableECharts(props) {
|
|
|
266
273
|
};
|
|
267
274
|
}
|
|
268
275
|
});
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
if (
|
|
276
|
+
if (allSelectedIndices.size > 0) {
|
|
277
|
+
series.data = data;
|
|
278
|
+
series.showSymbol = true;
|
|
279
|
+
if (markArea) {
|
|
280
|
+
debugAssert(markAreaWidth !== undefined, "when markArea === true, markAreaWidth is guaranteed to be defined at the beginning of this function");
|
|
281
|
+
const markAreas = [];
|
|
273
282
|
for (const i_3 of allSelectedIndices) {
|
|
274
283
|
const destructured_2 = destructureLineDataItem(inputSeries.data[i_3], i_3);
|
|
275
284
|
if (destructured_2 == null) {
|
|
@@ -286,22 +295,13 @@ export const withSelectable = ECharts => function SelectableECharts(props) {
|
|
|
286
295
|
coord: [xValue + markAreaWidth / 2]
|
|
287
296
|
}]);
|
|
288
297
|
}
|
|
298
|
+
series.markArea.data = markAreas;
|
|
289
299
|
}
|
|
290
|
-
series.markArea = {
|
|
291
|
-
itemStyle: {
|
|
292
|
-
...DEFAULT_MARK_AREA_STYLE,
|
|
293
|
-
...markAreaStyle
|
|
294
|
-
},
|
|
295
|
-
emphasis: {
|
|
296
|
-
disabled: true
|
|
297
|
-
},
|
|
298
|
-
data: markAreas
|
|
299
|
-
};
|
|
300
300
|
}
|
|
301
|
-
const seriesArray = [...inputSeriesArray];
|
|
302
|
-
seriesArray[seriesArray.indexOf(inputSeries)] = series;
|
|
303
|
-
option.series = seriesArray;
|
|
304
301
|
}
|
|
302
|
+
const seriesArray = [...inputSeriesArray];
|
|
303
|
+
seriesArray[seriesArray.indexOf(inputSeries)] = series;
|
|
304
|
+
option.series = seriesArray;
|
|
305
305
|
}
|
|
306
306
|
let t6;
|
|
307
307
|
if ($[17] !== selectionBoxStyle) {
|