Skip to content

Ft formatter #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
64f00e3
WIP - Formatter feature
graphieros Oct 19, 2024
1912269
Update tests
graphieros Oct 19, 2024
13afa83
Improvement - VueUiDonut - Add formatters
graphieros Oct 19, 2024
00ff7e4
Modification - Remove locale now useless
graphieros Oct 19, 2024
8174e07
Fix - VueUiDonut - Fix svg console errors when total is 0
graphieros Oct 19, 2024
abf5239
Improvement - VueUiXy - Add formatters
graphieros Oct 19, 2024
92c8e42
Improvement - VueUiTreemap - Add formatters
graphieros Oct 19, 2024
ffbc85e
Improvement - VueUiWaffle - Add formatters
graphieros Oct 20, 2024
cc0f6a4
Improvement - VueUiSparkbar & VueUiRadar - Add formatters
graphieros Oct 20, 2024
161e01b
Improvement - VueUiQuadrant - Add formatters
graphieros Oct 20, 2024
3e1dd30
Improvement - VueUiGauge - Add formatters
graphieros Oct 20, 2024
3bbc98d
Improvement - VueUiWheel - Add formatters
graphieros Oct 20, 2024
3bd6a29
Improvement - VueUiTiremarks - Add formatters
graphieros Oct 20, 2024
7c1badf
Improvement - VueUiChestnut - Add formatters
graphieros Oct 20, 2024
306018e
Improvement - VueUiOnion - Add formatters
graphieros Oct 20, 2024
e29ef5e
Improvement - VueUiVerticalBar - Add formatters
graphieros Oct 20, 2024
f8684f7
Improvement - VueUiHeatmap - Add formatters
graphieros Oct 20, 2024
88fdf86
Improvement - VueUiScatter - Add formatters
graphieros Oct 20, 2024
a6d8524
Improvement - VueUiSparkline - Add formatters
graphieros Oct 20, 2024
ad6fb8a
Improvement - VueUiSparkStackbar - Add formatters
graphieros Oct 20, 2024
520ce40
Improvement - VueUiSparkHistogram - Add formatters
graphieros Oct 20, 2024
d32fbfc
Improvement - VueUiSparkgauge - Add formatters
graphieros Oct 20, 2024
9957a80
Improvement - VueUiSparkTrend - Add formatters
graphieros Oct 20, 2024
382aee5
Improvement - VueUiQuickChart - Add formatters
graphieros Oct 20, 2024
10f2f6a
Improvement - VueUiAgePyramid - Add formatters
graphieros Oct 20, 2024
5075488
Improvement - VueUiThermometer - Add formatters
graphieros Oct 20, 2024
c9e8f6a
Improvement - VueUiRings - Add formatters
graphieros Oct 20, 2024
7f81300
Improvement - VueUiDonutEvolution - Add formatters
graphieros Oct 20, 2024
2a6e42c
Improvement - VueUiMoodRadar - Add formatters
graphieros Oct 20, 2024
801d9eb
Improvement - VueUiNestedDonuts - Add formatters
graphieros Oct 20, 2024
00faf99
Improvement - VueUiGalaxy - Add formatters
graphieros Oct 20, 2024
ad1fd28
Improvement - VueUiStripPlot - Add formatters
graphieros Oct 20, 2024
a416171
Improvement - VueUiDumbbell - Add formatters
graphieros Oct 20, 2024
73c95b9
Improvement - VueUi3dBar - Add formatters
graphieros Oct 20, 2024
71fd073
Improvement - VueUiTableSparkline - Add formatters
graphieros Oct 20, 2024
6bfefac
Improvement - VueUiXyCanvas - Add formatters
graphieros Oct 20, 2024
e915077
Improvement - VueUiFlow - Add formatters
graphieros Oct 20, 2024
80154e3
Improve formatter to pass config too
graphieros Oct 20, 2024
a0b5ecc
Update formatter
graphieros Oct 20, 2024
83af083
Update formatter
graphieros Oct 20, 2024
e196ef2
Update formatter
graphieros Oct 20, 2024
167a5e4
Update formatter
graphieros Oct 20, 2024
c5f464a
Update formatter
graphieros Oct 20, 2024
456490f
Update formatter
graphieros Oct 20, 2024
5a4f5ed
Update formatter
graphieros Oct 20, 2024
2ea1e9f
Update formatter
graphieros Oct 21, 2024
073ebfc
Update formatter
graphieros Oct 21, 2024
af2c3f6
Improvement - VueUiGizmo - Add formatters
graphieros Oct 21, 2024
d4690c9
Improvement - VueUiKpi - Add formatters
graphieros Oct 21, 2024
abee80a
Improvement - VueUiStackbar - Add formatters
graphieros Oct 21, 2024
7aba60e
Update tests
graphieros Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion TestingArena/ArenaVueUi3dBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,22 @@ const themeOptions = ref([
const currentTheme = ref(themeOptions.value[1])

const config = computed(() => {
const c = convertArrayToObject(model.value);
return {
...convertArrayToObject(model.value),
...c,
style: {
...c.style,
chart: {
...c.style.chart,
dataLabel: {
...c.style.chart.dataLabel,
formatter: ({value, config}) => {
// console.log(config)
return `f | ${value}`
}
}
}
},
theme: currentTheme.value,
customPalette: ['#6376DD', "#DD3322", "#66DDAA"],
}
Expand Down
22 changes: 22 additions & 0 deletions TestingArena/ArenaVueUiAgePyramid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,28 @@ const config = computed(() => {
} else {
return {
...c,
style: {
...c.style,
layout: {
...c.style.layout,
dataLabels: {
...c.style.layout.dataLabels,
xAxis: {
...c.style.layout.dataLabels.xAxis,
formatter: ({value, config}) => {
console.log(config)
return `X | ${value}`
}
},
yAxis: {
...c.style.layout.dataLabels.yAxis,
formatter: ({value}) => {
return `Y | ${value}`
}
},
}
}
},
theme: currentTheme.value
}
}
Expand Down
55 changes: 54 additions & 1 deletion TestingArena/ArenaVueUiChestnut.vue
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,61 @@ const themeOptions = ref([
const currentTheme = ref(themeOptions.value[1])

const config = computed(() => {
const c = convertArrayToObject(model.value);
return {
...convertArrayToObject(model.value),
...c,
style: {
...c.style,
chart: {
...c.style.chart,
layout: {
...c.style.chart.layout,
grandTotal: {
...c.style.chart.layout.grandTotal,
formatter: ({value}) => {
return `tot - ${value}`
}
},
roots: {
...c.style.chart.layout.roots,
labels: {
...c.style.chart.layout.roots.labels,
formatter: ({value, config }) => {
// console.log({config})
return `root - ${value}`
}
}
},
branches: {
...c.style.chart.layout.branches,
labels: {
...c.style.chart.layout.branches.labels,
dataLabels: {
...c.style.chart.layout.branches.labels.dataLabels,
formatter: ({value}) => {
return `branch - ${value}`
}
}
}
},
nuts: {
...c.style.chart.layout.nuts,
selected: {
...c.style.chart.layout.nuts.selected,
labels: {
...c.style.chart.layout.nuts.selected.labels,
dataLabels: {
...c.style.chart.layout.nuts.selected.labels.dataLabels,
formatter: ({value}) => {
return `nut - ${value}`
}
}
}
}
}
}
}
},
theme: currentTheme.value,
customPalette: ['#6376DD', "#DD3322", "#66DDAA"],
}
Expand Down
54 changes: 52 additions & 2 deletions TestingArena/ArenaVueUiDonut.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ const config = computed(() => {
tooltip: {
...c.style.chart.tooltip,
customFormat: (data) => {
console.log('XY CUSTOM TOOLTIP', data);
return "CUSTOM TOOLTIP"
return "CUSTOM TOOLTIP " + data
}
}
}
Expand All @@ -189,6 +188,57 @@ const config = computed(() => {
} else {
return {
...c,
style: {
...c.style,
chart: {
...c.style.chart,
layout: {
...c.style.chart.layout,
labels: {
...c.style.chart.layout.labels,
hollow: {
...c.style.chart.layout.labels.hollow,
total: {
...c.style.chart.layout.labels.hollow.total,
value: {
...c.style.chart.layout.labels.hollow.total.value,
formatter: ({value}) => {
return `f - ${value}`
}
}
},
average: {
...c.style.chart.layout.labels.hollow.average,
value: {
...c.style.chart.layout.labels.hollow.average.value,
formatter: ({value}) => {
return `f - ${value}`
}
}
},
},
value: {
...c.style.chart.layout.labels.value,
formatter: ({value, config}) => {

return `f - ${value}`
}
},
percentage: {
formatter: ({value}) => {
return `f - ${value}`
}
},
dataLabels: {
...c.style.chart.layout.labels.dataLabels,
formatter: ({value}) => {
return `f - ${value}`
}
}
}
},
}
},
theme: currentTheme.value,
// customPalette: ['#6376DD', "#DD3322", "#66DDAA"]
}
Expand Down
7 changes: 7 additions & 0 deletions TestingArena/ArenaVueUiDonutEvolution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ const config = computed(() => {
...c.style.chart,
layout: {
...c.style.chart.layout,
dataLabels: {
...c.style.chart.layout.dataLabels,
formatter: ({value, config}) => {
console.log(config)
return `f | ${value}`
}
},
grid: {
...c.style.chart.layout.grid,
xAxis: {
Expand Down
16 changes: 15 additions & 1 deletion TestingArena/ArenaVueUiDumbbell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,22 @@ const themeOptions = ref([
const currentTheme = ref(themeOptions.value[1])

const config = computed(() => {
const c = convertArrayToObject(model.value);
return {
...convertArrayToObject(model.value),
...c,
style: {
...c.style,
chart: {
...c.style.chart,
labels: {
...c.style.chart.labels,
formatter: ({value, config}) => {
// console.log(config)
return `f | ${value}`
}
}
}
},
theme: currentTheme.value
}
})
Expand Down
18 changes: 17 additions & 1 deletion TestingArena/ArenaVueUiFlow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,23 @@ const config = computed(() => {

return {
theme: currentTheme.value,
...c
...c,
style: {
...c.style,
chart: {
...c.style.chart,
nodes: {
...c.style.chart.nodes,
labels: {
...c.style.chart.nodes.labels,
formatter: ({value, config}) => {
// console.log(config)
return `f | ${value}`
}
}
}
}
}
}
})

Expand Down
19 changes: 19 additions & 0 deletions TestingArena/ArenaVueUiGalaxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,25 @@ const config = computed(() => {
} else {
return {
...c,
style: {
...c.style,
chart: {
...c.style.chart,
layout: {
...c.style.chart.layout,
labels: {
...c.style.chart.layout.labels,
dataLabels: {
...c.style.chart.layout.labels.dataLabels,
formatter: ({value, config}) => {
console.log(config)
return `f | ${value}`
}
}
}
}
}
},
theme: currentTheme.value,
customPalette: ['#6376DD', "#DD3322", "#66DDAA"],
}
Expand Down
17 changes: 15 additions & 2 deletions TestingArena/ArenaVueUiGauge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const dataset = computed(() => {

onMounted(() => {
setTimeout(() => {
source.value.value = -30
source.value.value = 50
step.value += 1
}, 3000)
})
Expand Down Expand Up @@ -89,8 +89,21 @@ const themeOptions = ref([
const currentTheme = ref(themeOptions.value[4])

const config = computed(() => {
const c = convertArrayToObject(model.value)
return {
...convertArrayToObject(model.value),
...c,
style: {
...c.style,
chart: {
...c.style.chart,
legend: {
...c.style.chart.legend,
formatter: ({value}) => {
return `f - ${value}`
}
}
}
},
theme: currentTheme.value,
customPalette: ['#6376DD', "#DD3322", "#66DDAA"],
}
Expand Down
5 changes: 4 additions & 1 deletion TestingArena/ArenaVueUiGizmo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ const model= ref([
const config = computed(() => {
const c = convertArrayToObject(model.value);
return {
...c
...c,
formatter: ({value}) => {
return `f | ${value}`
}
}
})

Expand Down
10 changes: 10 additions & 0 deletions TestingArena/ArenaVueUiHeatmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ const config = computed(() => {
...c.style,
layout: {
...c.style.layout,
cells: {
...c.style.layout.cells,
value: {
...c.style.layout.cells.value,
formatter: ({value, config}) => {
console.log(config)
return `f - ${value}`
}
}
},
dataLabels: {
...c.style.layout.dataLabels,
xAxis: {
Expand Down
14 changes: 10 additions & 4 deletions TestingArena/ArenaVueUiKpi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ function updateVal() {
dataset.value = Math.random() * 10000
}

const config = ref({
formatter: ({ value }) => {
return `f | ${value}`
}
})


</script>

Expand All @@ -24,16 +30,16 @@ function updateVal() {
<template #title>VueUiKpi</template>

<template #local>
<LocalVueUiKpi :dataset="dataset"/>
<LocalVueUiKpi :dataset="dataset" :config="config"/>
</template>
<template #VDUI-local>
<LocalVueDataUi component="VueUiKpi" :dataset="dataset"/>
<LocalVueDataUi component="VueUiKpi" :dataset="dataset" :config="config"/>
</template>
<template #build>
<VueUiKpi :dataset="dataset"/>
<VueUiKpi :dataset="dataset" :config="config"/>
</template>
<template #VDUI-build>
<VueDataUi component="VueUiKpi" :dataset="dataset"/>
<VueDataUi component="VueUiKpi" :dataset="dataset" :config="config"/>
</template>
</Box>
</template>
19 changes: 18 additions & 1 deletion TestingArena/ArenaVueUiMoodRadar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,25 @@ const themeOptions = ref([
const currentTheme = ref(themeOptions.value[3])

const config = computed(() => {
const c = convertArrayToObject(model.value);
return {
...convertArrayToObject(model.value),
...c,
style: {
...c.style,
chart: {
...c.style.chart,
layout: {
...c.style.chart.layout,
dataLabel: {
...c.style.chart.layout.dataLabel,
formatter: ({value, config }) => {
// console.log(config)
return `f | ${value}`
}
}
}
}
},
theme: currentTheme.value
}
})
Expand Down
Loading