Skip to content

Commit

Permalink
VueUiWaffle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
graphieros committed Mar 28, 2024
1 parent ef628ae commit 3ab5e1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-data-ui",
"private": false,
"version": "2.0.43",
"version": "2.0.44",
"type": "module",
"description": "A user-empowering data visualization Vue components library",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ const waffleDataset = [
{
name: "serie 2",
color: "",
values: [2],
values: [2.2],
shape: "diamond"
},
{
Expand Down
6 changes: 4 additions & 2 deletions src/components/vue-ui-waffle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ function segregate(uid) {
if(segregated.value.includes(uid)) {
segregated.value = segregated.value.filter(s => s !== uid);
}else {
segregated.value.push(uid);
if(segregated.value.length < legendSet.value.length - 1 && legendSet.value.length > 1) {
segregated.value.push(uid);
}
}
emit('selectLegend', waffleSet.value.map(w => {
return {
Expand Down Expand Up @@ -593,7 +595,7 @@ defineExpose({
/>
<template v-for="(position, i) in positions">
<foreignObject
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))"
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))"
:x="position.x + waffleConfig.style.chart.layout.labels.captions.offsetX"
:y="position.y + waffleConfig.style.chart.layout.labels.captions.offsetY"
:height="absoluteRectDimension"
Expand Down

0 comments on commit 3ab5e1a

Please sign in to comment.