Skip to content

Commit 13b4207

Browse files
committed
Fix - VueUiParallelCoordinatePlot - Fix errors occurring when passing incomplete dataset series
1 parent 5403bac commit 13b4207

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/vue-ui-parallel-coordinate-plot.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ const filteredDs = computed(() => {
277277
const scales = computed(() => {
278278
let s = [];
279279
for (let i = 0; i < maxSeries.value; i += 1 ) {
280-
const min = Math.min(...filteredDs.value.flatMap(ds => ds.series.map(s => s.values[i]) || 0));
281-
const max = Math.max(...filteredDs.value.flatMap(ds => ds.series.map(s => s.values[i]) || 0));
280+
const min = Math.min(...filteredDs.value.flatMap(ds => ds.series.map(s => s.values[i] || 0) || 0));
281+
const max = Math.max(...filteredDs.value.flatMap(ds => ds.series.map(s => s.values[i] || 0) || 0));
282282
const opMin = max === min ? min / 4 : min;
283283
const opMax = max === min ? max * 2 : max;
284284
const scale = calculateNiceScale(opMin, opMax, FINAL_CONFIG.value.style.chart.yAxis.scaleTicks);
@@ -317,9 +317,9 @@ const mutableDataset = computed(() => {
317317
axisIndex: k,
318318
datapointIndex: j,
319319
seriesIndex: i,
320-
value: v,
320+
value: v || 0,
321321
x: drawingArea.value.left + (slot.value * k) + (slot.value / 2),
322-
y: drawingArea.value.bottom - (drawingArea.value.height * (senseValue / senseMax)),
322+
y: (drawingArea.value.bottom - (drawingArea.value.height * ((senseValue) / senseMax))),
323323
comment: s.comments ? s.comments[k] || '' : ''
324324
}
325325
})

0 commit comments

Comments
 (0)