@tsingroc/tsingroc-components 5.0.0-alpha.17 → 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,7 +226,7 @@ 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
231
|
itemStyle: {
|
|
232
232
|
...DEFAULT_MARK_AREA_STYLE,
|
|
@@ -240,7 +240,7 @@ export const withSelectable = ECharts => function SelectableECharts(props) {
|
|
|
240
240
|
};
|
|
241
241
|
if (inputSeries.data && (selectedIndices.size > 0 || mode === "add" && mouseState?.end)) {
|
|
242
242
|
const allSelectedIndices = new Set();
|
|
243
|
-
|
|
243
|
+
const data = inputSeries.data.map((point_1, i_2) => {
|
|
244
244
|
const destructured_1 = destructureLineDataItem(point_1, i_2);
|
|
245
245
|
if (destructured_1 == null) {
|
|
246
246
|
return point_1;
|
|
@@ -273,26 +273,30 @@ export const withSelectable = ECharts => function SelectableECharts(props) {
|
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
});
|
|
276
|
-
if (
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
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 = [];
|
|
282
|
+
for (const i_3 of allSelectedIndices) {
|
|
283
|
+
const destructured_2 = destructureLineDataItem(inputSeries.data[i_3], i_3);
|
|
284
|
+
if (destructured_2 == null) {
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
const [t6] = destructured_2;
|
|
288
|
+
const [xValue] = t6;
|
|
289
|
+
if (typeof xValue !== "number") {
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
markAreas.push([{
|
|
293
|
+
coord: [xValue - markAreaWidth / 2]
|
|
294
|
+
}, {
|
|
295
|
+
coord: [xValue + markAreaWidth / 2]
|
|
296
|
+
}]);
|
|
288
297
|
}
|
|
289
|
-
markAreas
|
|
290
|
-
coord: [xValue - markAreaWidth / 2]
|
|
291
|
-
}, {
|
|
292
|
-
coord: [xValue + markAreaWidth / 2]
|
|
293
|
-
}]);
|
|
298
|
+
series.markArea.data = markAreas;
|
|
294
299
|
}
|
|
295
|
-
series.markArea.data = markAreas;
|
|
296
300
|
}
|
|
297
301
|
}
|
|
298
302
|
const seriesArray = [...inputSeriesArray];
|