11<script setup>
2- import { ref , computed } from " vue" ;
2+ import { ref , computed , onMounted } from " vue" ;
33import LocalVueUiDonut from ' ../src/components/vue-ui-donut.vue' ;
44import LocalVueDataUi from ' ../src/components/vue-data-ui.vue' ;
55import Box from " ./Box.vue" ;
@@ -14,11 +14,11 @@ const dataset = ref([
1414 },
1515 {
1616 name: ' Serie 2' ,
17- values: [0 ]
17+ values: [1 ]
1818 },
1919 {
2020 name: ' Serie 3' ,
21- values: [0 ],
21+ values: [2 ],
2222 comment: " This is another comment that is quite long to see how it fits on the chart and to see if it's nit overflowing."
2323 },
2424 // {
@@ -154,6 +154,9 @@ const model = ref([
154154 { key: ' style.chart.legend.bold' , def: false , type: ' checkbox' , label: ' bold' , category: ' legend' },
155155 { key: ' style.chart.legend.roundingValue' , def: 0 , type: ' number' , min: 0 , max: 6 , label: [' rounding' , ' is' , ' value' ], category: ' legend' },
156156 { key: ' style.chart.legend.roundingPercentage' , def: 0 , type: ' number' , min: 0 , max: 6 , label: ' percentageRounding' , category: ' legend' },
157+ { key: ' style.chart.legend.showPercentage' , def: true , type: ' checkbox' },
158+ { key: ' style.chart.legend.showValue' , def: true , type: ' checkbox' },
159+
157160 { key: ' style.chart.title.text' , def: ' Title' , type: ' text' , label: ' textContent' , category: ' title' },
158161 { key: ' style.chart.title.color' , def: ' #1A1A1A' , type: ' color' , label: ' textColor' , category: ' title' },
159162 { key: ' style.chart.title.fontSize' , def: 20 , type: ' number' , min: 6 , max: 48 , label: ' fontSize' , category: ' title' },
@@ -335,6 +338,13 @@ function toggleLabels() {
335338 localVdui .value .toggleLabels ();
336339}
337340
341+ onMounted (async () => {
342+ if (localDonut .value ) {
343+ const img = await localDonut .value .getImage ()
344+ console .log (img)
345+ }
346+ })
347+
338348 </script >
339349
340350<template >
0 commit comments