Skip to content

Commit 9572728

Browse files
committed
VueUiGalaxy added gradient config option
1 parent b085fe3 commit 9572728

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
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.46",
4+
"version": "2.0.47",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/atoms/BaseIcon.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const icons = computed(() => {
7272
moodNeutral: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" d="M1 10A1 1 0 0019 10 1 1 0 001 10M5 12C9 12 11 12 15 12M5 7A1 1 0 008 7 1 1 0 005 7M12 7A1 1 0 0015 7 1 1 0 0012 7" />`,
7373
moodSad: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" d="M1 10A1 1 0 0019 10 1 1 0 001 10M5 14C6 9 14 9 15 14L5 14M5 7A1 1 0 008 7 1 1 0 005 7M12 7A1 1 0 0015 7 1 1 0 0012 7" />`,
7474
pdf: `<path stroke-width="${props.strokeWidth}" fill="none" stroke="${props.stroke}" stroke-linecap="round" stroke-linejoin="round" d="M4 1C2 1 1 2 1 4L1 16C1 18 2 19 4 19L16 19C18 19 19 18 19 16L19 6C15 6 14 5 14 1ZM4 16 4 9 5 9Q7 9 7 11 7 13 5 13L4 13M9 16 9 9 9 9Q12 9 12 12L12 13Q12 16 9 16L9 16M14 16 14 9 16 9M14 12 16 12"/>`,
75-
csv: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" d="M 4 1 C 2 1 1 2 1 4 L 1 16 C 1 18 2 19 4 19 L 16 19 C 18 19 19 18 19 16 L 19 6 C 15 6 14 5 14 1 Z M 7 11 C 7 10 7 9 6 9 L 5 9 C 4 9 4 10 4 11 L 4 14 C 4 15 4 16 5 16 L 6 16 C 7 16 7 15 7 14 M 12 11 C 12 10 12 9 11 9 L 10 9 C 9 9 9 10 9 11 C 9 13 12 12 12 14 C 12 15 12 16 11 16 L 10 16 C 9 16 9 15 9 14 M 14 9 L 15 16 L 16 9" />`,
75+
csv: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" stroke-linejoin="round" d="M 4 1 C 2 1 1 2 1 4 L 1 16 C 1 18 2 19 4 19 L 16 19 C 18 19 19 18 19 16 L 19 6 C 15 6 14 5 14 1 Z M 7 11 C 7 10 7 9 6 9 L 5 9 C 4 9 4 10 4 11 L 4 14 C 4 15 4 16 5 16 L 6 16 C 7 16 7 15 7 14 M 12 11 C 12 10 12 9 11 9 L 10 9 C 9 9 9 10 9 11 C 9 13 12 12 12 14 C 12 15 12 16 11 16 L 10 16 C 9 16 9 15 9 14 M 14 9 L 15 16 L 16 9" />`,
7676
screenshot: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />`,
7777
skeleton: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" d="M3 14A1 1 0 003 18L7 18A1 1 0 007 14L3 14M3 8A1 1 0 003 12L7 12A1 1 0 007 8L3 8M3 2A1 1 0 003 6L4 6A1 1 0 004 2L3 2M12 10 12 16C12 17 13 18 14 18L17 18C18 18 19 17 19 16L19 10C19 9 18 8 17 8L14 8C13 8 12 9 12 10" stroke-dasharray="2" />`,
7878
smiley: `<path fill="none" stroke="${props.stroke}" stroke-width="${props.strokeWidth}" stroke-linecap="round" d="M1 10A1 1 0 0019 10 1 1 0 001 10M5 12C8 14 12 14 15 12M5 7A1 1 0 008 7 1 1 0 005 7M12 7A1 1 0 0015 7 1 1 0 0012 7" />`,

src/components/vue-ui-galaxy.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,7 @@ defineExpose({
414414
fill="none"
415415
:stroke="galaxyConfig.style.chart.backgroundColor"
416416
:stroke-width="(galaxyConfig.style.chart.layout.arcs.strokeWidth + galaxyConfig.style.chart.layout.arcs.borderWidth) * (selectedSerie === datapoint.id && galaxyConfig.style.chart.layout.arcs.hoverEffect.show ? galaxyConfig.style.chart.layout.arcs.hoverEffect.multiplicator : 1)"
417-
stroke-linecap="round"
418-
417+
stroke-linecap="round"
419418
/>
420419
<path
421420
v-if="datapoint.value"
@@ -426,6 +425,16 @@ defineExpose({
426425
stroke-linecap="round"
427426
:class="`${selectedSerie && selectedSerie !== datapoint.id && galaxyConfig.useBlurOnHover ? 'vue-ui-galaxy-blur' : ''}`"
428427
/>
428+
<path
429+
v-if="datapoint.value && galaxyConfig.style.chart.layout.arcs.gradient.show"
430+
:d="datapoint.path"
431+
fill="none"
432+
:stroke="galaxyConfig.style.chart.layout.arcs.gradient.color"
433+
:stroke-width="(galaxyConfig.style.chart.layout.arcs.strokeWidth / 2) * (selectedSerie === datapoint.id && galaxyConfig.style.chart.layout.arcs.hoverEffect.show ? galaxyConfig.style.chart.layout.arcs.hoverEffect.multiplicator : 1)"
434+
stroke-linecap="round"
435+
:class="`vue-ui-galaxy-gradient ${selectedSerie && selectedSerie !== datapoint.id && galaxyConfig.useBlurOnHover ? 'vue-ui-galaxy-blur' : ''}`"
436+
:style="`filter: blur(5px) opacity(${galaxyConfig.style.chart.layout.arcs.gradient.intensity}%)`"
437+
/>
429438
</g>
430439

431440
<!-- TRAPS -->

src/default_configs.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,11 +3321,11 @@
33213321
"hoverEffect": {
33223322
"show": true,
33233323
"multiplicator": 1.1
3324-
}
3325-
},
3326-
"labels": {
3327-
"dataLabels": {
3328-
"show": true
3324+
},
3325+
"gradient": {
3326+
"show": true,
3327+
"intensity": 30,
3328+
"color": "#FFFFFF"
33293329
}
33303330
}
33313331
},

types/vue-data-ui.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ declare module 'vue-data-ui' {
3939
hoverEffect?: {
4040
show?: boolean;
4141
multiplicator?: number;
42-
}
43-
};
44-
labels?: {
45-
dataLabels?: {
42+
};
43+
gradient?: {
4644
show?: boolean;
45+
intensity?: number;
46+
color?: string;
4747
};
4848
};
4949
};

0 commit comments

Comments
 (0)