@@ -23,25 +23,28 @@ import { VueUiStackbar as VueUiStackbarTreeshaken } from "vue-data-ui/vue-ui-sta
2323function makeDs (n ) {
2424 const arr = [];
2525 for (let i = 0 ; i < n; i += 1 ) {
26- arr .push (Math .random () * 5 * (Math .random () > 0.3 ? 1 : 1 ))
26+ if (i === 0 ) {
27+ arr .push (0 )
28+ }
29+ arr .push (Math .random () * 5 * (Math .random () > 0.3 ? 1 : - 1 ))
2730 }
2831 return arr;
2932}
3033
3134const dataset = ref ([
3235 {
3336 name: " Series 1" ,
34- series: makeDs (100 ),
37+ series: makeDs (24 ),
3538 marked: true
3639 },
3740 {
3841 name: " Series 2" ,
39- series: makeDs (100 ),
42+ series: makeDs (24 ),
4043 marked: true
4144 },
4245 {
4346 name: " Series 3" ,
44- series: makeDs (100 ),
47+ series: makeDs (24 ),
4548 },
4649 ]);
4750
@@ -185,9 +188,11 @@ const model = ref([
185188 { key: ' style.chart.tooltip.offsetY' , def: 24 , type: ' number' , min: 0 , max: 64 },
186189 { key: ' style.chart.tooltip.showValue' , def: true , type: ' checkbox' },
187190 { key: ' style.chart.tooltip.showPercentage' , def: true , type: ' checkbox' },
188- { key: ' style.chart.tooltip.roundingValue' , def: 0 , type: ' number' , min: 0 , max: 6 },
191+ { key: ' style.chart.tooltip.roundingValue' , def: 2 , type: ' number' , min: 0 , max: 6 },
189192 { key: ' style.chart.tooltip.roundingPercentage' , def: 0 , type: ' number' , min: 0 , max: 6 },
190193 { key: ' style.chart.tooltip.showTimeLabel' , def: true , type: ' checkbox' },
194+ { key: ' style.chart.tooltip.showTotal' , def: true , type: ' checkbox' },
195+ { key: ' style.chart.tooltip.totalTranslation' , def: ' Total' , type: ' text' },
191196
192197 { key: ' style.chart.highlighter.color' , def: ' #1A1A1A' , type: ' color' },
193198 { key: ' style.chart.highlighter.opacity' , def: 5 , type: ' range' , min: 0 , max: 30 },
@@ -202,12 +207,14 @@ const model = ref([
202207 { key: ' style.chart.bars.gradient.intensity' , def: 20 , type: ' range' , min: 0 , max: 100 },
203208
204209 { key: ' style.chart.bars.totalValues.show' , def: true , type: ' checkbox' },
205- { key: ' style.chart.bars.totalValues.offsetY' , def: 0 , type: ' number' , min: - 100 , max: 100 },
210+ { key: ' style.chart.bars.totalValues.offsetY' , def: 6 , type: ' number' , min: - 100 , max: 100 },
211+ { key: ' style.chart.bars.totalValues.offsetX' , def: 6 , type: ' number' , min: - 100 , max: 100 },
212+
206213 { key: ' style.chart.bars.totalValues.fontSize' , def: 16 , type: ' number' , min: 8 , max: 42 },
207214 { key: ' style.chart.bars.totalValues.bold' , def: false , type: ' checkbox' },
208215 { key: ' style.chart.bars.totalValues.color' , def: ' #1A1A1A' , type: ' color' },
209216
210- { key: ' style.chart.bars.dataLabels.show' , def: false , type: ' checkbox' },
217+ { key: ' style.chart.bars.dataLabels.show' , def: true , type: ' checkbox' },
211218 { key: ' style.chart.bars.dataLabels.hideEmptyValues' , def: false , type: ' checkbox' },
212219 { key: ' style.chart.bars.dataLabels.hideEmptyPercentages' , def: true , type: ' checkbox' },
213220
@@ -216,8 +223,8 @@ const model = ref([
216223 { key: ' style.chart.bars.dataLabels.fontSize' , def: 14 , type: ' number' , min: 8 , max: 42 },
217224 { key: ' style.chart.bars.dataLabels.bold' , def: false , type: ' checkbox' },
218225 { key: ' style.chart.bars.dataLabels.rounding' , def: 2 , type: ' number' , min: 0 , max: 6 },
219- { key: ' style.chart.bars.dataLabels.prefix' , def: ' P ' , type: ' text' },
220- { key: ' style.chart.bars.dataLabels.suffix' , def: ' S ' , type: ' text' },
226+ { key: ' style.chart.bars.dataLabels.prefix' , def: ' ' , type: ' text' },
227+ { key: ' style.chart.bars.dataLabels.suffix' , def: ' ' , type: ' text' },
221228
222229 { key: ' style.chart.bars.dataLabels.hideUnderValue' , def: null , type: ' number' , min: 0 , max: 100 },
223230 { key: ' style.chart.bars.dataLabels.hideUnderPercentage' , def: 10 , type: ' number' , min: 0 , max: 100 },
@@ -331,9 +338,9 @@ const config = computed(() => {
331338 ... c .style .chart .bars ,
332339 dataLabels: {
333340 ... c .style .chart .bars .dataLabels ,
334- formatter : ({value, config}) => {
335- return ` f | ${ value} `
336- }
341+ // formatter: ({value, config}) => {
342+ // return `f | ${value}`
343+ // }
337344 }
338345 },
339346 zoom: {
@@ -368,9 +375,9 @@ const config = computed(() => {
368375 y: {
369376 ... c .style .chart .grid .y ,
370377 axisLabels: {
371- formatter : ({ value }) => {
372- return ' BOO' + value
373- }
378+ // formatter: ({ value }) => {
379+ // return 'BOO' + value
380+ // }
374381 }
375382 }
376383 }
@@ -462,7 +469,7 @@ const resp = ref(null);
462469 responsive: true,
463470 }" @selectTimeLabel= " selectTimeLabel" >
464471 < template #svg= " { svg }" >
465- < g v- html= " freestyle(svg)" / >
472+ <!-- < g v- html= " freestyle(svg)" / > -- >
466473 < / template>
467474
468475 < template #chart- background>
0 commit comments