Skip to content

Commit bddde60

Browse files
committed
VueUiSparkStackbar add legend margin
1 parent 62a0218 commit bddde60

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
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": "1.8.5",
4+
"version": "1.8.6",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/components/vue-ui-sparkstackbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const drawableDataset = computed(() => {
114114
/>
115115
</g>
116116
</svg>
117-
<div v-if="stackConfig.style.legend.show" :style="`background:${stackConfig.style.backgroundColor};display:flex;flex-wrap:wrap;column-gap:12px;width:calc(100% - 12px);margin:0 auto; padding: 0 6px;justify-content:${stackConfig.style.legend.textAlign === 'left' ? 'flex-start' : stackConfig.style.legend.textAlign === 'right' ? 'flex-end' : 'center'}`">
117+
<div v-if="stackConfig.style.legend.show" :style="`background:${stackConfig.style.backgroundColor};display:flex;flex-wrap:wrap;column-gap:12px;width:calc(100% - 12px);margin:0 auto;margin:${stackConfig.style.legend.margin}; padding: 0 6px;justify-content:${stackConfig.style.legend.textAlign === 'left' ? 'flex-start' : stackConfig.style.legend.textAlign === 'right' ? 'flex-end' : 'center'}`">
118118
<div v-for=" (rect, i) in drawableDataset" :style="`font-size:${stackConfig.style.legend.fontSize}px`">
119119
<div style="display:flex;flex-direction:row;align-items:center;gap:4px;justify-content:center">
120120
<svg :height="`${stackConfig.style.legend.fontSize}px`" :width="`${stackConfig.style.legend.fontSize}px`" viewBox="0 0 10 10">

src/default_configs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,6 +2277,7 @@
22772277
"textAlign": "left",
22782278
"show": true,
22792279
"fontSize": 12,
2280+
"margin": "6px 0 0 0",
22802281
"name": {
22812282
"color": "#2D353C",
22822283
"bold": false

types/vue-data-ui.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ declare module 'vue-data-ui' {
1919
legend?: {
2020
textAlign?: "left" | "right" | "center";
2121
show?: boolean;
22+
margin?: string;
2223
fontSize?: number;
2324
name?: {
2425
color?: string;

0 commit comments

Comments
 (0)