From a363ab02c71b9db7aeae0cfb538a2daadd90536c Mon Sep 17 00:00:00 2001 From: graphieros Date: Thu, 22 May 2025 16:54:43 +0200 Subject: [PATCH 1/3] Improvement - VueUiChestnut - Set better proportions for expanded donuts --- src/components/vue-ui-chestnut.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/vue-ui-chestnut.vue b/src/components/vue-ui-chestnut.vue index 1a635373..dec91fc3 100644 --- a/src/components/vue-ui-chestnut.vue +++ b/src/components/vue-ui-chestnut.vue @@ -371,7 +371,7 @@ function pickNut(branch) { branch.x2 + 24 + FINAL_CONFIG.value.style.chart.layout.nuts.offsetX, branch.y1 + svg.value.branchSize / 2, 80, - 80 + 80, ); emit('selectNut', branch.breakdown) }) @@ -1026,7 +1026,7 @@ defineExpose({ 16, false, false, - 64 + 64, )" :stroke="arc.color" stroke-width="1" @@ -1057,7 +1057,7 @@ defineExpose({ From 2fe3400396377e177248357d46261370d6ffc55a Mon Sep 17 00:00:00 2001 From: graphieros Date: Thu, 22 May 2025 16:55:26 +0200 Subject: [PATCH 2/3] Improvement - VueUiXy - Add config option to cut out null values from lines and areas --- TestingArena/ArenaVueUiXy.vue | 22 +- package.json | 2 +- src/App.vue | 2 +- src/components/vue-ui-xy.vue | 110 +++-- src/lib.js | 200 ++++++++ src/useConfig.js | 1 + tests/lib.test.js | 871 ++++++++++++++++++++++++++++++++++ types/vue-data-ui.d.ts | 1 + 8 files changed, 1171 insertions(+), 38 deletions(-) diff --git a/TestingArena/ArenaVueUiXy.vue b/TestingArena/ArenaVueUiXy.vue index 1d29dcbd..448b0e1a 100644 --- a/TestingArena/ArenaVueUiXy.vue +++ b/TestingArena/ArenaVueUiXy.vue @@ -11,7 +11,11 @@ const { local, build, vduiLocal, vduiBuild, toggleTable, toggleLabels, toggleSta function createDs(n,m=100) { const arr = []; for(let i = 0; i < n; i += 1) { - arr.push(Math.random()*m) + if ([7,8,9].includes(i)) { + arr.push(null) + } else { + arr.push(Math.random()*m * (i % 2 === 0 ? -1 : 1)) + } } return arr } @@ -45,16 +49,16 @@ function createDs(n,m=100) { const dataset = ref([ { name: "Curved", - series: createDs(120), - type: "plot", - smooth: false, + series: createDs(12), + type: "line", + smooth: true, useArea: true, useTag: 'start', dataLabels: false, }, { name: "Curved", - series: createDs(120), + series: createDs(12), type: "line", smooth: false, useArea: true, @@ -407,6 +411,8 @@ const model = ref([ { key: 'line.radius', def: 6, type: 'number', min: 0, max: 20, label: 'radius', category: 'line' }, { key: 'line.useGradient', def: false, type: 'checkbox', label: 'useGradient', category: 'line' }, { key: 'line.strokeWidth', def: 2, type: 'number', min: 1, max: 20, label: 'thickness', category: 'line' }, + { key: 'line.cutNullValues', def: true, type: 'checkbox'}, + { key: 'line.labels.show', def: true, type: 'checkbox', label: 'showDataLabels', category: 'line' }, { key: 'line.labels.offsetY', def: -8, type: 'number', min: -100, max: 100, label: 'offsetYDataLabels', category: 'line' }, { key: 'line.labels.rounding', def: 0, type: 'number', min: 0, max: 6, label: 'rounding', category: 'line' }, @@ -525,7 +531,7 @@ const config = computed(() => { tag: { formatter: ({ value, config }) => { const { datapoint, seriesIndex, serieName } = config; - console.log(datapoint, seriesIndex, serieName) + // console.log(datapoint, seriesIndex, serieName) return `
${serieName}: ${value.toFixed(2)}
` } } @@ -849,7 +855,7 @@ function selectTimeLabel(data) { -