@@ -322,8 +322,61 @@ const themeOptions = ref([
322322const currentTheme = ref (themeOptions .value [1 ])
323323
324324const config = computed (() => {
325+ const c = convertArrayToObject (model .value );
325326 return {
326- ... convertArrayToObject (model .value ),
327+ ... c,
328+ style: {
329+ ... c .style ,
330+ chart: {
331+ ... c .style .chart ,
332+ layout: {
333+ ... c .style .chart .layout ,
334+ grandTotal: {
335+ ... c .style .chart .layout .grandTotal ,
336+ formatter : ({value}) => {
337+ return ` tot - ${ value} `
338+ }
339+ },
340+ roots: {
341+ ... c .style .chart .layout .roots ,
342+ labels: {
343+ ... c .style .chart .layout .roots .labels ,
344+ formatter : ({value, config }) => {
345+ // console.log({config})
346+ return ` root - ${ value} `
347+ }
348+ }
349+ },
350+ branches: {
351+ ... c .style .chart .layout .branches ,
352+ labels: {
353+ ... c .style .chart .layout .branches .labels ,
354+ dataLabels: {
355+ ... c .style .chart .layout .branches .labels .dataLabels ,
356+ formatter : ({value}) => {
357+ return ` branch - ${ value} `
358+ }
359+ }
360+ }
361+ },
362+ nuts: {
363+ ... c .style .chart .layout .nuts ,
364+ selected: {
365+ ... c .style .chart .layout .nuts .selected ,
366+ labels: {
367+ ... c .style .chart .layout .nuts .selected .labels ,
368+ dataLabels: {
369+ ... c .style .chart .layout .nuts .selected .labels .dataLabels ,
370+ formatter : ({value}) => {
371+ return ` nut - ${ value} `
372+ }
373+ }
374+ }
375+ }
376+ }
377+ }
378+ }
379+ },
327380 theme: currentTheme .value ,
328381 customPalette: [' #6376DD' , " #DD3322" , " #66DDAA" ],
329382 }
0 commit comments