Skip to content

Commit 1cf31fd

Browse files
committed
VueUiSkeleton add donutEvolution type
1 parent bd3db53 commit 1cf31fd

File tree

6 files changed

+48
-6
lines changed

6 files changed

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

src/App.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3533,10 +3533,11 @@ const skeletonOptions = ref([
35333533
'candlesticks',
35343534
'pyramid',
35353535
'rings',
3536-
'wheel'
3536+
'wheel',
3537+
'donutEvolution'
35373538
]);
35383539
3539-
const skeletonChoice = ref('wheel')
3540+
const skeletonChoice = ref('donutEvolution')
35403541
35413542
const tiremarksDataset = ref({
35423543
percentage: 75

src/components/vue-ui-skeleton.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,25 @@ const ticks = computed(() => {
486486
<line :x1="200" :x2="200" :y1="10" :y2="300" :stroke="skeletonConfig.style.backgroundColor" :stroke-width="3"/>
487487
</svg>
488488
</template>
489+
490+
<!-- TYPE DONUT EVOLUTION -->
491+
<template v-if="type === 'donutEvolution'">
492+
<svg data-cy="skeleton-donut-evolution" width="100%" viewBox="0 0 108 70" :style="`background:${skeletonConfig.style.backgroundColor}`">
493+
<path v-if="skeletonConfig.style.line.axis.show" d="M3 3 3 67 105 67" :stroke="skeletonConfig.style.donutEvolution.axis.color" :stroke-width="skeletonConfig.style.donutEvolution.axis.strokeWidth" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
494+
495+
<path fill="none" d="M10 55A1 1 0 0020 55 1 1 0 0010 55M12 55A1 1 0 0018 55 1 1 0 0012 55M10 55 12 55M15 52 15 50M27 45A1 1 0 0037 45 1 1 0 0027 45M29 45A1 1 0 0035 45 1 1 0 0029 45M32 48 32 50M35 45 37 45M44 50A1 1 0 0054 50 1 1 0 0044 50M46 50A1 1 0 0052 50 1 1 0 0046 50M49 45 49 47M49 53 49 55M61 35A1 1 0 0071 35 1 1 0 0061 35M63 35A1 1 0 0069 35 1 1 0 0063 35M66 30 66 32M61 35 63 35M78 41A1 1 0 0088 41 1 1 0 0078 41M80 41A1 1 0 0086 41 1 1 0 0080 41M78 41 80 41M86 41 88 41M95 14A1 1 0 00105 14 1 1 0 0095 14M97 14A1 1 0 00103 14 1 1 0 0097 14M95 14 97 14M100 17 100 19" :stroke="skeletonConfig.style.donutEvolution.donuts.color" :stroke-width="skeletonConfig.style.donutEvolution.donuts.strokeWidth"/>
496+
497+
<path fill="none" d="M19 52 27 45M37 45 44 49M52 46 62 38M71 36 78 40M86 37 97 18" :stroke="skeletonConfig.style.donutEvolution.axis.color" :stroke-width="skeletonConfig.style.donutEvolution.axis.strokeWidth" stroke-linecap="round" stroke-linejoin="round"/>
498+
499+
<path d="M10 55 12 55C12 53 14 52 15 52L15 50C13 50 10 52 10 55" :fill="skeletonConfig.style.donutEvolution.donuts.color" stroke="none" style="opacity:0.3" />
500+
<path d="M32 48 32 50C35 50 37 47 37 45L35 45C35 47 33 48 32 48" :fill="skeletonConfig.style.donutEvolution.donuts.color" stroke="none" style="opacity:0.3" />
501+
<path d="M49 53 49 55A1 1 0 0049 45L49 47C53 47 53 53 49 53" :fill="skeletonConfig.style.donutEvolution.donuts.color" stroke="none" style="opacity:0.3" />
502+
<path d="M63 35C63 33 65 32 66 32L66 30C63 30 61 33 61 35L63 35" :fill="skeletonConfig.style.donutEvolution.donuts.color" stroke="none" style="opacity:0.3" />
503+
<path d="M78 41A1 1 0 0088 41L86 41C86 45 80 45 80 41L78 41" :fill="skeletonConfig.style.donutEvolution.donuts.color" stroke="none" style="opacity:0.3" />
504+
<path d="M95 14C95 17 98 19 100 19L100 17C99 17 97 16 97 14L95 14" :fill="skeletonConfig.style.donutEvolution.donuts.color" stroke="none" style="opacity:0.3" />
505+
506+
</svg>
507+
</template>
489508

490509
<!-- TYPE LINE -->
491510
<template v-if="type === 'line'">

src/default_configs.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,17 @@
13771377
"color": "#e1e5e8",
13781378
"strokeWidth": 0.7
13791379
},
1380+
"donutEvolution": {
1381+
"axis": {
1382+
"show": true,
1383+
"color": "#E1E5E8",
1384+
"strokeWidth": 0.5
1385+
},
1386+
"donuts": {
1387+
"strokeWidth": 0.5,
1388+
"color": "e1e5e8"
1389+
}
1390+
},
13801391
"line": {
13811392
"axis": {
13821393
"show": true,

types/vue-data-ui.d.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3278,7 +3278,7 @@ declare module 'vue-data-ui' {
32783278
}>;
32793279

32803280
export type VueUiSkeletonConfig = {
3281-
type?: "bar" | "chestnut" | "donut" | "gauge" | "line" | "onion" | "quadrant" | "radar" | "rating" | "table" | "verticalBar" | "waffle" | "heatmap" | "candlestick" | "pyramid" | "wheel" | "rings";
3281+
type?: "bar" | "chestnut" | "donut" | "gauge" | "line" | "onion" | "quadrant" | "radar" | "rating" | "table" | "verticalBar" | "waffle" | "heatmap" | "candlestick" | "pyramid" | "wheel" | "rings" | "donutEvolution";
32823282
style?: {
32833283
backgroundColor?: string;
32843284
color?: string;
@@ -3295,6 +3295,17 @@ declare module 'vue-data-ui' {
32953295
showPlots?: boolean;
32963296
};
32973297
};
3298+
donutEvolution?: {
3299+
axis?: {
3300+
show?: boolean;
3301+
color?: string;
3302+
strokeWidth?: number;
3303+
};
3304+
donuts?: {
3305+
strokeWidth?: number;
3306+
color?: string;
3307+
};
3308+
};
32983309
bar?: {
32993310
axis?: {
33003311
show?: boolean;

0 commit comments

Comments
 (0)