Skip to content

Commit 4c164f9

Browse files
committed
Dev environment - Update VueUiRelationCircle testing arena
1 parent 73061ba commit 4c164f9

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

TestingArena/ArenaVueUiRelationCircle.vue

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ const dataset = ref([
1010
id: "01",
1111
label: "Lorem",
1212
relations: ["02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"],
13-
weights: [5, 3, 10, 2, 9, 3, 1, 2, 3, 7, 1],
13+
weights: [5, 3, 20, 2, 9, 3, 1, 2, 3, 7, 1],
1414
},
1515
{
1616
id: "02",
1717
label: "Ipsum",
18-
relations: ["01", "03", "07", "06", "07"],
19-
weights: [3, 2, 9, 7, 1],
18+
relations: ["01", "03"],
19+
weights: [3, 2],
2020
},
2121
{
2222
id: "03",
@@ -28,7 +28,7 @@ const dataset = ref([
2828
id: "04",
2929
label: "Consectetur",
3030
relations: ["01", "05", "10"],
31-
weights: [2, 1, 4],
31+
weights: [3, 1, 4],
3232
},
3333
{
3434
id: "05",
@@ -89,16 +89,17 @@ const model = ref([
8989
{ key: 'userOptions.position', def: 'right', type: 'select', options: ['left', 'right']},
9090
9191
{ key: 'style.color', def: '#1A1A1A', type: 'color'},
92-
{ key: 'style.backgroundColor', def: '#FFFFFF20', type: 'color'},
92+
{ key: 'style.backgroundColor', def: '#FFFFFF', type: 'color'},
9393
{ key: 'style.fontFamily', def: 'inherit', type: 'text'},
9494
{ key: 'style.size', def: 400, type: 'number', min: 100, max: 1000},
9595
{ key: 'style.limit', def: 50, type: 'range', min: 2, max: 100},
9696
{ key: 'style.animation.show', def: true, type: 'checkbox'},
9797
{ key: 'style.animation.speedMs', def: 300, type: 'number', min: 0, max: 1000},
9898
{ key: 'style.labels.color', def: '#1A1A1A', type: 'color'},
9999
{ key: 'style.labels.fontSize', def: 10, type: 'number', min: 8, max: 48},
100-
{ key: 'style.labels.links.curved', def: true, type: 'checkbox'},
101-
{ key: 'style.labels.links.maxWidth', def: 3, type: 'number', min: 0, max: 100}, // useless ?
100+
{ key: 'style.links.curved', def: false, type: 'checkbox'},
101+
{ key: 'style.links.maxWidth', def: 5, type: 'number', min: 0, max: 100},
102+
102103
{ key: 'style.circle.radiusProportion', def: 0.2, type: 'number', min: 0.1, max: 1, step: 0.01},
103104
{ key: 'style.circle.stroke', def: '#CCCCCC', type: 'color'},
104105
{ key: 'style.circle.strokeWidth', def: 1, type: 'number', min: 0, max: 12},
@@ -126,10 +127,20 @@ const themeOptions = ref([
126127
const currentTheme = ref(themeOptions.value[4])
127128
128129
const config = computed(() => {
130+
const c = convertArrayToObject(model.value);
129131
return {
130-
...convertArrayToObject(model.value),
132+
...c,
131133
theme: currentTheme.value,
132134
customPalette: ['#6376DD', "#DD3322", "#66DDAA"],
135+
style: {
136+
...c.style,
137+
// weightLabels: {
138+
// formatter: ({ value, config }) =>{
139+
// console.log(value, config);
140+
// return value
141+
// }
142+
// }
143+
}
133144
}
134145
})
135146
@@ -150,6 +161,9 @@ const step = ref(0)
150161
...config,
151162
responsive: true
152163
}">
164+
<!-- <template #dataLabel="{ x,y,color,weight }">
165+
<circle :cx="x" :cy="y" r="12" :fill="color"/>
166+
</template> -->
153167
<template #watermark="{ isPrinting }">
154168
<div v-if="isPrinting" style="font-size: 100px; opacity: 0.1; transform: rotate(-10deg)">
155169
WATERMARK

0 commit comments

Comments
 (0)