Skip to content

Commit 3ab5e1a

Browse files
committed
VueUiWaffle fixes
1 parent ef628ae commit 3ab5e1a

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-data-ui",
33
"private": false,
4-
"version": "2.0.43",
4+
"version": "2.0.44",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ const waffleDataset = [
374374
{
375375
name: "serie 2",
376376
color: "",
377-
values: [2],
377+
values: [2.2],
378378
shape: "diamond"
379379
},
380380
{

src/components/vue-ui-waffle.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,9 @@ function segregate(uid) {
340340
if(segregated.value.includes(uid)) {
341341
segregated.value = segregated.value.filter(s => s !== uid);
342342
}else {
343-
segregated.value.push(uid);
343+
if(segregated.value.length < legendSet.value.length - 1 && legendSet.value.length > 1) {
344+
segregated.value.push(uid);
345+
}
344346
}
345347
emit('selectLegend', waffleSet.value.map(w => {
346348
return {
@@ -593,7 +595,7 @@ defineExpose({
593595
/>
594596
<template v-for="(position, i) in positions">
595597
<foreignObject
596-
v-if="!waffleConfig.style.chart.layout.grid.vertical && waffleConfig.style.chart.layout.labels.captions.show && ((rects[i].isFirst && position.position < waffleConfig.style.chart.layout.grid.size - 3) || (rects[i].isAbsoluteFirst && i % waffleConfig.style.chart.layout.grid.size === 0 && rects[i].absoluteStartIndex))"
598+
v-if="!waffleConfig.style.chart.layout.grid.vertical && waffleConfig.style.chart.layout.labels.captions.show && ((rects[i].isFirst && position.position < waffleConfig.style.chart.layout.grid.size - 2) || (rects[i].isAbsoluteFirst && i % waffleConfig.style.chart.layout.grid.size === 0 && rects[i].absoluteStartIndex))"
597599
:x="position.x + waffleConfig.style.chart.layout.labels.captions.offsetX"
598600
:y="position.y + waffleConfig.style.chart.layout.labels.captions.offsetY"
599601
:height="absoluteRectDimension"

0 commit comments

Comments
 (0)