Skip to content

Commit 2ea1e9f

Browse files
committed
Update formatter
1 parent 5a4f5ed commit 2ea1e9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+324
-194
lines changed

TestingArena/ArenaVueUi3dBar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ const config = computed(() => {
142142
...c.style.chart,
143143
dataLabel: {
144144
...c.style.chart.dataLabel,
145-
formatter: (val) => {
146-
return `f | ${val}`
145+
formatter: ({value, config}) => {
146+
// console.log(config)
147+
return `f | ${value}`
147148
}
148149
}
149150
}

TestingArena/ArenaVueUiAgePyramid.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,15 @@ const config = computed(() => {
135135
...c.style.layout.dataLabels,
136136
xAxis: {
137137
...c.style.layout.dataLabels.xAxis,
138-
formatter: (val) => {
139-
return `X | ${val}`
138+
formatter: ({value, config}) => {
139+
console.log(config)
140+
return `X | ${value}`
140141
}
141142
},
142143
yAxis: {
143144
...c.style.layout.dataLabels.yAxis,
144-
formatter: (val) => {
145-
return `Y | ${val}`
145+
formatter: ({value}) => {
146+
return `Y | ${value}`
146147
}
147148
},
148149
}

TestingArena/ArenaVueUiDonutEvolution.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ const config = computed(() => {
131131
...c.style.chart.layout,
132132
dataLabels: {
133133
...c.style.chart.layout.dataLabels,
134-
formatter: (val) => {
135-
return `f | ${val}`
134+
formatter: ({value, config}) => {
135+
console.log(config)
136+
return `f | ${value}`
136137
}
137138
},
138139
grid: {

TestingArena/ArenaVueUiDumbbell.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ const config = computed(() => {
134134
...c.style.chart,
135135
labels: {
136136
...c.style.chart.labels,
137-
formatter: (val) => {
138-
return `f | ${val}`
137+
formatter: ({value, config}) => {
138+
// console.log(config)
139+
return `f | ${value}`
139140
}
140141
}
141142
}

TestingArena/ArenaVueUiFlow.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ const config = computed(() => {
8484
...c.style.chart.nodes,
8585
labels: {
8686
...c.style.chart.nodes.labels,
87-
formatter: (val) => {
88-
return `f | ${val}`
87+
formatter: ({value, config}) => {
88+
console.log(config)
89+
return `f | ${value}`
8990
}
9091
}
9192
}

TestingArena/ArenaVueUiGalaxy.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,9 @@ const config = computed(() => {
131131
...c.style.chart.layout.labels,
132132
dataLabels: {
133133
...c.style.chart.layout.labels.dataLabels,
134-
formatter: (val) => {
135-
return `f | ${val}`
134+
formatter: ({value, config}) => {
135+
console.log(config)
136+
return `f | ${value}`
136137
}
137138
}
138139
}

TestingArena/ArenaVueUiHeatmap.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ const config = computed(() => {
146146
...c.style.layout.cells,
147147
value: {
148148
...c.style.layout.cells.value,
149-
formatter: (val) => {
150-
return `f - ${val}`
149+
formatter: ({value, config}) => {
150+
console.log(config)
151+
return `f - ${value}`
151152
}
152153
}
153154
},

TestingArena/ArenaVueUiMoodRadar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ const config = computed(() => {
9898
...c.style.chart.layout,
9999
dataLabel: {
100100
...c.style.chart.layout.dataLabel,
101-
formatter: (val) => {
102-
return `f | ${val}`
101+
formatter: ({value, config }) => {
102+
// console.log(config)
103+
return `f | ${value}`
103104
}
104105
}
105106
}

TestingArena/ArenaVueUiNestedDonuts.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ const config = computed(() => {
182182
...c.style.chart.layout.labels,
183183
dataLabels: {
184184
...c.style.chart.layout.labels.dataLabels,
185-
formatter: (val) => {
186-
return `f | ${val}`
185+
formatter: ({value, config}) => {
186+
// console.log(config)
187+
return `f | ${value}`
187188
}
188189
}
189190
}

TestingArena/ArenaVueUiOnion.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ const config = computed(() => {
158158
...c.style.chart.layout.labels,
159159
value: {
160160
...c.style.chart.layout.labels.value,
161-
formatter: (val) => {
162-
return `f - ${val}`
161+
formatter: ({value}) => {
162+
return `f - ${value}`
163163
}
164164
}
165165
}

TestingArena/ArenaVueUiQuickChart.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,9 @@ const config = computed(() => {
184184
const c = convertArrayToObject(model.value);
185185
return {
186186
...c,
187-
formatter: (val) => {
188-
return `f - ${val}`
187+
formatter: ({value, config}) => {
188+
// console.log(config)
189+
return `f - ${value}`
189190
},
190191
theme: currentTheme.value,
191192
customPalette: ['#6376DD', "#DD3322", "#66DDAA"],

TestingArena/ArenaVueUiRings.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ const config = computed(() => {
140140
...c.style.chart.layout.labels,
141141
dataLabels: {
142142
...c.style.chart.layout.labels.dataLabels,
143-
formatter: (val) => {
144-
return `f | ${val}`
143+
formatter: ({value, config}) => {
144+
// console.log(config)
145+
return `f | ${value}`
145146
}
146147
}
147148
}

TestingArena/ArenaVueUiScatter.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,15 @@ const config = computed(() => {
223223
labels: {
224224
...c.style.layout.plots.selectors.labels,
225225
x: {
226-
formatter: (val) => {
227-
return `X | ${val}`
226+
formatter: ({value, config}) => {
227+
console.log(config)
228+
return `X | ${value}`
228229
}
229230
},
230231
y: {
231-
formatter: (val) => {
232-
return `Y | ${val}`
232+
formatter: ({value, config}) => {
233+
console.log(config)
234+
return `Y | ${value}`
233235
}
234236
}
235237
}

TestingArena/ArenaVueUiSparkGauge.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ const config = computed(() => {
6767
...c.style,
6868
dataLabel: {
6969
...c.style.dataLabel,
70-
formatter: (val) => {
71-
return `f - ${val}`
70+
formatter: ({value, config}) => {
71+
// console.log(config)
72+
return `f - ${value}`
7273
}
7374
}
7475
},

TestingArena/ArenaVueUiSparkHistogram.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,9 @@ const config = computed(() => {
161161
...c.style.labels,
162162
value: {
163163
...c.style.labels.value,
164-
formatter: (val) => {
165-
return `f - ${val}`
164+
formatter: ({value, config}) => {
165+
console.log(config)
166+
return `f - ${value}`
166167
}
167168
}
168169
}

TestingArena/ArenaVueUiSparkStackbar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ const config = computed(() => {
7878
...c.style.legend,
7979
value: {
8080
...c.style.legend.value,
81-
formatter: (val) => {
82-
return `f - ${val}`
81+
formatter: ({value, config }) => {
82+
console.log(config)
83+
return `f - ${value}`
8384
}
8485
}
8586
}

TestingArena/ArenaVueUiSparkTrend.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ const config = computed(() => {
6666
...c.style,
6767
dataLabel: {
6868
...c.style.dataLabel,
69-
formatter: (val) => {
70-
return `f - ${val}`
69+
formatter: ({value, config}) => {
70+
// console.log(config)
71+
return `f - ${value}`
7172
}
7273
}
7374
},

TestingArena/ArenaVueUiSparkbar.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const dataset = ref([
1313
suffix: "%",
1414
prefix: 'P',
1515
target: 1000,
16-
formatter: (val) => {
17-
return `f1 - ${val}`
16+
formatter: ({value, config}) => {
17+
// console.log(config)
18+
return `f1 - ${value}`
1819
}
1920
},
2021
{
@@ -24,8 +25,8 @@ const dataset = ref([
2425
suffix: "%",
2526
prefix: 'P',
2627
target: 2.3,
27-
formatter: (val) => {
28-
return `f2 - ${val}`
28+
formatter: ({value}) => {
29+
return `f2 - ${value}`
2930
}
3031
},
3132
{
@@ -43,8 +44,8 @@ function addDatapoint() {
4344
value: Math.random() * 100,
4445
rounding: 0,
4546
target: 100,
46-
formatter: (val) => {
47-
return `f - ${val}`
47+
formatter: ({value}) => {
48+
return `f - ${value}`
4849
}
4950
})
5051
}

TestingArena/ArenaVueUiSparkline.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ const config = computed(() => {
139139
...c.style,
140140
dataLabel: {
141141
...c.style.dataLabel,
142-
formatter: (val) => {
143-
return `f - ${val}`
142+
formatter: ({value, config}) => {
143+
// console.log(config)
144+
return `f - ${value}`
144145
}
145146
}
146147
},

TestingArena/ArenaVueUiStripPlot.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ const config = computed(() => {
219219
...c.style.chart,
220220
labels: {
221221
...c.style.chart.labels,
222-
formatter: (val) => {
223-
return `f | ${val}`
222+
formatter: ({value, config}) => {
223+
// console.log(config)
224+
return `f | ${value}`
224225
}
225226
}
226227
}

TestingArena/ArenaVueUiTableSparkline.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ const currentTheme = ref(themeOptions.value[2])
9393
const config = computed(() => {
9494
return {
9595
...convertArrayToObject(model.value),
96-
formatter: (val) => {
97-
return `f | ${val}`
96+
formatter: ({value, config }) => {
97+
// console.log(config)
98+
return `f | ${value}`
9899
},
99100
theme: currentTheme.value,
100101
customPalette: ['#6376DD', "#DD3322", "#66DDAA"],

TestingArena/ArenaVueUiThermometer.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ const config = computed(() => {
7373
...c.style.chart,
7474
label: {
7575
...c.style.chart.label,
76-
formatter: (val) => {
77-
return `f | ${val}`
76+
formatter: ({value, config}) => {
77+
console.log(config)
78+
return `f | ${value}`
7879
}
7980
}
8081
}

TestingArena/ArenaVueUiVerticalBar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ const config = computed(() => {
201201
...c.style.chart.layout.bars.dataLabels,
202202
value: {
203203
...c.style.chart.layout.bars.dataLabels.value,
204-
formatter: (val) => {
205-
return `f - ${val}`
204+
formatter: ({value, config}) => {
205+
// console.log(config)
206+
return `f - ${value}`
206207
}
207208
}
208209
}

TestingArena/ArenaVueUiXyCanvas.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ const config = computed(() => {
189189
...c.style.chart,
190190
dataLabels: {
191191
...c.style.chart.dataLabels,
192-
formatter: (val) => {
193-
return `f | ${val}`
192+
formatter: ({value, config}) => {
193+
// console.log(config)
194+
return `f | ${value}`
194195
}
195196
},
196197
// tooltip: {

0 commit comments

Comments
 (0)