11<script setup>
22import { ref , computed , onMounted } from " vue" ;
3- import LocalVueUiVerticalBar from ' ../src/components/vue-ui-vertical-bar.vue' ;
43import LocalVueDataUi from ' ../src/components/vue-data-ui.vue' ;
54import Box from " ./Box.vue" ;
65import convertArrayToObject from " ./convertModel" ;
@@ -9,6 +8,8 @@ import { useArena } from "../src/useArena";
98import { VueUiHorizontalBar } from " vue-data-ui" ;
109import { VueUiHorizontalBar as VueUiHorizontalBarTreeshaken } from " vue-data-ui/vue-ui-horizontal-bar" ;
1110
11+ import LocalVueUiHorizontalBar from " ../src/components/vue-ui-horizontal-bar.vue" ;
12+
1213const { local , build , vduiLocal , vduiBuild , toggleTable , toggleSort } = useArena ()
1314
1415const dataset = ref ([])
@@ -18,11 +19,11 @@ onMounted(() => {
1819 dataset .value = [
1920 {
2021 name: " Serie 1 with" ,
21- value: 100.987987 ,
22+ value: 220 ,
2223 children: [
2324 {
2425 name: " serie 1 child 1" ,
25- value: 12
26+ value: 200
2627 },
2728 {
2829 name: " serie 1 child 2" ,
@@ -112,7 +113,7 @@ function alterDataset() {
112113const model = ref ([
113114 { key: ' debug' , def: true , type: ' checkbox' },
114115 { key: ' loading' , def: false , type: ' checkbox' },
115- { key: ' autoSize' , def: true , type: ' checkbox' },
116+ { key: ' autoSize' , def: false , type: ' checkbox' },
116117 { key: ' responsive' , def: false , type: ' checkbox' },
117118 { key: ' userOptions.show' , def: true , type: ' checkbox' },
118119 { key: ' userOptions.buttons.pdf' , def: true , type: ' checkbox' },
@@ -134,7 +135,7 @@ const model = ref([
134135 { key: ' style.chart.layout.bars.sort' , def: ' desc' , type: ' select' , options: [' asc' , ' desc' , ' none' ]},
135136 { key: ' style.chart.layout.bars.useStroke' , def: false , type: ' checkbox' },
136137 { key: ' style.chart.layout.bars.strokeWidth' , def: 2 , type: ' number' , min: 0 , max: 12 },
137- { key: ' style.chart.layout.bars.height' , def: 56 , type: ' number' , min: 12 , max: 64 },
138+ { key: ' style.chart.layout.bars.height' , def: 32 , type: ' number' , min: 12 , max: 64 },
138139 { key: ' style.chart.layout.bars.gap' , def: 6 , type: ' number' , min: 0 , max: 24 },
139140 { key: ' style.chart.layout.bars.borderRadius' , def: 4 , type: ' range' , min: 0 , max: 48 }, // IDEA: max could be based on height to always be harmonious
140141 { key: ' style.chart.layout.bars.offsetX' , def: 0 , type: ' number' , min: 0 , max: 100 },
@@ -156,13 +157,13 @@ const model = ref([
156157 { key: ' style.chart.layout.bars.nameLabels.show' , def: true , type: ' checkbox' },
157158 { key: ' style.chart.layout.bars.nameLabels.color' , def: ' #1A1A1A' , type: ' color' },
158159 { key: ' style.chart.layout.bars.nameLabels.bold' , def: false , type: ' checkbox' },
159- { key: ' style.chart.layout.bars.nameLabels.fontSize' , def: 20 , type: ' range' , min: 8 , max: 48 },
160- { key: ' style.chart.layout.bars.nameLabels.offsetX' , def: - 12 , type: ' number' , min: - 100 , max: 100 },
160+ { key: ' style.chart.layout.bars.nameLabels.fontSize' , def: 14 , type: ' range' , min: 8 , max: 48 },
161+ { key: ' style.chart.layout.bars.nameLabels.offsetX' , def: 0 , type: ' number' , min: - 100 , max: 100 },
161162 { key: ' style.chart.layout.bars.parentLabels.show' , def: true , type: ' checkbox' },
162163 { key: ' style.chart.layout.bars.parentLabels.color' , def: ' #1A1A1A' , type: ' color' },
163164 { key: ' style.chart.layout.bars.parentLabels.bold' , def: false , type: ' checkbox' },
164165 { key: ' style.chart.layout.bars.parentLabels.fontSize' , def: 14 , type: ' range' , min: 8 , max: 48 },
165- { key: ' style.chart.layout.bars.parentLabels.offsetX' , def: 24 , type: ' number' , min: - 100 , max: 100 },
166+ { key: ' style.chart.layout.bars.parentLabels.offsetX' , def: 0 , type: ' number' , min: - 100 , max: 100 },
166167 { key: ' style.chart.layout.highlighter.color' , def: ' #1A1A1A' , type: ' color' },
167168 { key: ' style.chart.layout.highlighter.opacity' , def: 5 , type: ' range' , min: 0 , max: 100 },
168169 { key: ' style.chart.layout.separators.show' , def: true , type: ' checkbox' },
@@ -178,7 +179,7 @@ const model = ref([
178179 { key: ' style.chart.title.subtitle.color' , def: ' #CCCCCC' , type: ' color' },
179180 { key: ' style.chart.title.subtitle.bold' , def: false , type: ' checkbox' },
180181 { key: ' style.chart.title.subtitle.fontSize' , def: 16 , type: ' number' , min: 8 , max: 48 },
181- { key: ' style.chart.legend.position' , def: ' top ' , type: ' select' , options: [' top' , ' bottom' ]},
182+ { key: ' style.chart.legend.position' , def: ' bottom ' , type: ' select' , options: [' top' , ' bottom' ]},
182183 { key: ' style.chart.legend.show' , def: true , type: ' checkbox' },
183184 { key: ' style.chart.legend.backgroundColor' , def: ' #FFFFFF' , type: ' color' },
184185 { key: ' style.chart.legend.color' , def: ' #1A1A1A' , type: ' color' },
@@ -338,7 +339,7 @@ onMounted(async () => {
338339 </div >
339340
340341 <div style =" width : 600px ; height : 600px ; resize : both ; overflow : auto ; background : white " >
341- <LocalVueUiVerticalBar :key =" `responsive_${step}`" :dataset =" dataset" :config =" {
342+ <LocalVueUiHorizontalBar :key =" `responsive_${step}`" :dataset =" dataset" :config =" {
342343 ...config,
343344 responsive: true
344345 }" >
@@ -366,18 +367,18 @@ onMounted(async () => {
366367 SOURCE: Lorem ipsum dolor sit, amet consectetur adipisicing elit. Tenetur, molestiae perspiciatis nam quae libero, deserunt in aperiam unde officia sint saepe laboriosam ducimus aspernatur labore! Sapiente aspernatur corrupti quis ad.
367368 </div>
368369 </template> -->
369- </LocalVueUiVerticalBar >
370+ </LocalVueUiHorizontalBar >
370371 </div >
371372
372373 <Box comp =" VueUiVerticalBar" :dataset =" dataset" >
373374 <template #title >VueUiVerticalBar</template >
374375
375376 <template #theme >
376- <LocalVueUiVerticalBar :dataset =" dataset" :config =" configTheme" />
377+ <LocalVueUiHorizontalBar :dataset =" dataset" :config =" configTheme" />
377378 </template >
378379
379380 <template #local >
380- <LocalVueUiVerticalBar :dataset =" isPropsToggled ? alternateDataset : dataset" :config =" isPropsToggled ? alternateConfig : config" :key =" `local_${step}`" @selectLegend =" selectLegend" ref =" local" >
381+ <LocalVueUiHorizontalBar :dataset =" isPropsToggled ? alternateDataset : dataset" :config =" isPropsToggled ? alternateConfig : config" :key =" `local_${step}`" @selectLegend =" selectLegend" ref =" local" >
381382 <template #optionSort >
382383 SORT
383384 </template >
@@ -402,7 +403,7 @@ onMounted(async () => {
402403 <template #tooltip-after =" { datapoint , seriesIndex , series , config , bars , lines , plots } " >
403404 #AFTER {{ series.name }}
404405 </template >
405- </LocalVueUiVerticalBar >
406+ </LocalVueUiHorizontalBar >
406407 </template >
407408
408409 <template #VDUI-local >
0 commit comments