Skip to content

Commit a7fc0a9

Browse files
committed
VueUiRings create component
1 parent bda9d19 commit a7fc0a9

10 files changed

+842
-9
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
![GitHub issues](https://img.shields.io/github/issues/graphieros/vue-data-ui)
1515
![NPM](https://img.shields.io/npm/l/vue-data-ui)
1616
![npm](https://img.shields.io/npm/dt/vue-data-ui)
17-
![Static Badge](https://img.shields.io/badge/components-26-green)
17+
![Static Badge](https://img.shields.io/badge/components-27-green)
1818

1919
[Interactive documentation](https://vue-data-ui.graphieros.com/)
2020

@@ -38,6 +38,8 @@ Available components:
3838
- [VueUiAgePyramid](https://vue-data-ui.graphieros.com/docs#vue-ui-age-pyramid)
3939
- [VueUiRelationCircle](https://vue-data-ui.graphieros.com/docs#vue-ui-relation-circle)
4040
- [VueUiThermometer](https://vue-data-ui.graphieros.com/docs#vue-ui-thermometer)
41+
- [VueUiRings](https://vue-data-ui.graphieros.com/docs#vue-ui-rings)
42+
4143

4244
## Mini charts
4345
- [VueUiSparkline](https://vue-data-ui.graphieros.com/docs#vue-ui-sparkline)

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
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.20",
4+
"version": "1.9.21",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [
@@ -30,7 +30,8 @@
3030
"annotator",
3131
"smiley",
3232
"relationship circle",
33-
"thermometer"
33+
"thermometer",
34+
"rings"
3435
],
3536
"author": "Alec Lloyd Probert",
3637
"repository": {

src/App.vue

+70
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import RelationTest from "./components/vue-ui-relation-circle.vue";
3838
import ThermoTest from "./components/vue-ui-thermometer.vue";
3939
import StackTest from "./components/vue-ui-sparkstackbar.vue";
4040
import HistoTest from "./components/vue-ui-sparkhistogram.vue";
41+
import RingsTest from "./components/vue-ui-rings.vue";
4142
4243
const dataset = ref([
4344
{
@@ -3430,6 +3431,50 @@ const histoDataset = ref([
34303431
},
34313432
]);
34323433
3434+
const ringsConfig = ref({
3435+
style: {
3436+
chart: {
3437+
title: {
3438+
text: "Title",
3439+
subtitle: {
3440+
text: "Subtitle"
3441+
}
3442+
}
3443+
}
3444+
}
3445+
});
3446+
const ringsDataset = ref([
3447+
{
3448+
name: "Serie 1",
3449+
values: [100]
3450+
},
3451+
{
3452+
name: "Serie 2",
3453+
values: [100, 80]
3454+
},
3455+
{
3456+
name: "Serie 3",
3457+
values: [120]
3458+
},
3459+
{
3460+
name: "Serie 4",
3461+
values: [60]
3462+
},
3463+
{
3464+
name: "Serie 5",
3465+
values: [20]
3466+
},
3467+
{
3468+
name: "Serie 6",
3469+
values: [10]
3470+
},
3471+
{
3472+
name: "Serie 7",
3473+
values: [2]
3474+
},
3475+
])
3476+
3477+
34333478
const showLocalTest = ref(false);
34343479
34353480
function copyConfig(c) {
@@ -3446,16 +3491,41 @@ function copyConfig(c) {
34463491
document.body.removeChild(selBox);
34473492
}
34483493
3494+
const updateStep = ref(0);
3495+
34493496
</script>
34503497

34513498
<template>
3499+
<button @click="updateStep += 1">UPDATE</button>
34523500
<div style="padding: 48px; font-weight: bold; line-height: 20px">
34533501
<h1 style="font-size: 36px; color: #666666">
34543502
Vue Data UI
34553503
</h1>
34563504
<h2 style="color: #A6A6A6">Components</h2>
34573505
</div>
3506+
34583507
<div style="padding-left: 48px; padding-right: 48px">
3508+
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_rings)">
3509+
<template #title>VueUiRings</template>
3510+
<template #dev>
3511+
<RingsTest
3512+
ref="rings"
3513+
:dataset="ringsDataset"
3514+
:config="ringsConfig"
3515+
/>
3516+
</template>
3517+
<template #prod>
3518+
<VueUiRings
3519+
ref="rings"
3520+
:dataset="ringsDataset"
3521+
:config="ringsConfig"
3522+
/>
3523+
</template>
3524+
<template #config>
3525+
{{ PROD_CONFIG.vue_ui_rings }}
3526+
</template>
3527+
</Box>
3528+
34593529
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_relation_circle)">
34603530
<template #title>VueUiRelationCircle</template>
34613531
<template #dev>

src/components/vue-ui-donut.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ const dataTable = computed(() => {
259259
name: h.name
260260
},
261261
table.value.body[i].toFixed(donutConfig.value.table.td.roundingValue),
262-
isNaN(table.value.body[i] / total.value) ? "-" : (table.value.body[i] / total.value * 100).toFixed(donutConfig.value.table.td.roundingPercentage)
262+
isNaN(table.value.body[i] / total.value) ? "-" : (table.value.body[i] / total.value * 100).toFixed(donutConfig.value.table.td.roundingPercentage) + '%'
263263
]
264264
});
265265

0 commit comments

Comments
 (0)