@@ -9,37 +9,46 @@ import { useArena } from "../src/useArena";
99const { local , build , vduiLocal , vduiBuild , toggleTable } = useArena ()
1010
1111const dataset = ref ([
12- [ ' A1' , ' B1' , 10 ],
13- [ ' A1' , ' B2' , 10 ],
14- [ ' B1' , ' C1' , 5 ],
15- [ ' B1' , ' C2' , 5 ],
16- [ ' B1' , ' C3' , 5 ],
17- [ ' B1' , ' C4' , 5 ],
18- [ ' A2' , ' B1' , 10 ],
19- [ ' B2' , ' C5' , 10 ],
20- [ ' C3' , ' D1' , 2 ],
21- [ ' C4' , ' D1' , 2 ],
22- [ ' C5' , ' D1' , 2 ],
23- [ ' C2' , ' D2' , 2 ],
24- [ ' C3' , ' D2' , 1 ],
12+ // Sources
13+ [' Households' , ' Collection Centers' , 40 ],
14+ [' Restaurants' , ' Collection Centers' , 20 ],
15+ [' Industries' , ' Collection Centers' , 30 ],
16+ [' Littering' , ' Environment' , 10 ],
17+
18+ // Collection to Processing
19+ [' Collection Centers' , ' Recycling Plants' , 50 ],
20+ [' Collection Centers' , ' Landfills' , 25 ],
21+ [' Collection Centers' , ' Incineration' , 15 ],
22+
23+ // Processing to Final Outcome
24+ [' Recycling Plants' , ' Recycled Products' , 30 ],
25+ [' Recycling Plants' , ' Exported Waste' , 20 ],
26+ [' Landfills' , ' Methane Emission' , 10 ],
27+ [' Landfills' , ' Buried Waste' , 15 ],
28+ [' Incineration' , ' Energy Recovery' , 10 ],
29+ [' Incineration' , ' Air Pollution' , 5 ],
30+
31+ // Direct Environment impact
32+ [' Environment' , ' Ocean Pollution' , 6 ],
33+ [' Environment' , ' Soil Contamination' , 4 ],
2534]);
26-
35+
2736const model = ref ([
2837 { key: ' userOptions.show' , def: true , type: ' checkbox' },
2938 { key: ' userOptions.buttons.pdf' , def: true , type: ' checkbox' },
3039 { key: ' userOptions.buttons.csv' , def: true , type: ' checkbox' },
3140 { key: ' userOptions.buttons.img' , def: true , type: ' checkbox' },
3241 { key: ' userOptions.buttons.table' , def: true , type: ' checkbox' },
3342 { key: ' userOptions.buttons.fullscreen' , def: true , type: ' checkbox' },
34- { key: ' userOptions.position' , def: ' right' , type: ' select' , options: [' left' , ' right' ]},
35- { key: ' userOptions.showOnChartHover' , def: true , type: ' checkbox' },
36- { key: ' userOptions.keepStateOnChartLeave' , def: true , type: ' checkbox' },
43+ { key: ' userOptions.position' , def: ' right' , type: ' select' , options: [' left' , ' right' ] },
44+ { key: ' userOptions.showOnChartHover' , def: true , type: ' checkbox' },
45+ { key: ' userOptions.keepStateOnChartLeave' , def: true , type: ' checkbox' },
3746
38- { key: ' userOptions.print.scale' , def: 2 , type: ' number' , min: 1 , max: 5 },
39- { key: ' userOptions.print.allowTaint' , def: true , type: ' checkbox' },
40- { key: ' userOptions.print.useCORS' , def: true , type: ' checkbox' },
47+ { key: ' userOptions.print.scale' , def: 2 , type: ' number' , min: 1 , max: 5 },
48+ { key: ' userOptions.print.allowTaint' , def: true , type: ' checkbox' },
49+ { key: ' userOptions.print.useCORS' , def: true , type: ' checkbox' },
4150 { key: ' userOptions.print.backgroundColor' , def: ' #FFFFFF' },
42-
51+
4352 { key: ' style.fontFamily' , def: ' inherit' , type: ' text' },
4453 { key: ' style.chart.backgroundColor' , def: ' #FFFFFF20' , type: ' color' },
4554 { key: ' style.chart.color' , def: ' #1A1A1A' , type: ' color' },
@@ -62,7 +71,7 @@ const model = ref([
6271 { key: ' style.chart.nodes.labels.abbreviation.use' , def: true , type: ' checkbox' },
6372 { key: ' style.chart.nodes.labels.abbreviation.length' , def: 3 , type: ' number' , min: 1 , max: 12 },
6473 { key: ' style.chart.nodes.stroke' , def: ' #FFFFFF' , type: ' color' },
65- { key: ' style.chart.nodes.strokeWidth' , def: 1 , type: ' number' , min: 0 , max: 12 },
74+ { key: ' style.chart.nodes.strokeWidth' , def: 1 , type: ' number' , min: 0 , max: 12 },
6675 { key: ' style.chart.links.opacity' , def: 0.8 , type: ' number' , min: 0 , max: 1 , step: 0.1 },
6776 { key: ' style.chart.links.stroke' , def: ' #FFFFFF' , type: ' color' },
6877 { key: ' style.chart.links.strokeWidth' , def: 1 , type: ' number' , min: 0 , max: 12 },
@@ -95,7 +104,7 @@ const config = computed(() => {
95104 ... c .style .chart .nodes ,
96105 labels: {
97106 ... c .style .chart .nodes .labels ,
98- formatter : ({value, config}) => {
107+ formatter : ({ value, config }) => {
99108 // console.log(config)
100109 return ` f | ${ value} `
101110 }
@@ -125,7 +134,7 @@ const step = ref(0);
125134 <template #local >
126135 <LocalVueUiFlow :dataset =" dataset" :config =" config" :key =" `local_${step}`" ref =" local" >
127136 <template #chart-background >
128- <div style =" width : 100% ; height : 100% ; background : radial-gradient (at top left , red , white )" />
137+ <div style =" width : 100% ; height : 100% ; background : radial-gradient (at top left , red , white )" />
129138 </template >
130139
131140 <template #optionPdf >
@@ -139,22 +148,26 @@ const step = ref(0);
139148 </template >
140149 <template #source >
141150 <div style =" width :100% ;font-size :10px ;text-align :left " >
142- 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.
151+ SOURCE: Lorem ipsum dolor sit, amet consectetur adipisicing elit. Tenetur, molestiae
152+ perspiciatis nam quae libero, deserunt in aperiam unde officia sint saepe laboriosam ducimus
153+ aspernatur labore! Sapiente aspernatur corrupti quis ad.
143154 </div >
144- </template >
155+ </template >
145156 </LocalVueUiFlow >
146157 </template >
147158
148159 <template #VDUI-local >
149- <LocalVueDataUi component =" VueUiFlow" :dataset =" dataset" :config =" config" :key =" `VDUI_local_${step}`" ref =" vduiLocal" ></LocalVueDataUi >
160+ <LocalVueDataUi component =" VueUiFlow" :dataset =" dataset" :config =" config" :key =" `VDUI_local_${step}`"
161+ ref =" vduiLocal" ></LocalVueDataUi >
150162 </template >
151163
152164 <template #build >
153165 <VueUiFlow :dataset =" dataset" :config =" config" :key =" `build_${step}`" ref =" build" ></VueUiFlow >
154166 </template >
155167
156168 <template #VDUI-build >
157- <VueDataUi component =" VueUiFlow" :dataset =" dataset" :config =" config" :key =" `VDUI_build_${step}`" ref =" vduiBuild" ></VueDataUi >
169+ <VueDataUi component =" VueUiFlow" :dataset =" dataset" :config =" config" :key =" `VDUI_build_${step}`"
170+ ref =" vduiBuild" ></VueDataUi >
158171 </template >
159172
160173 <template #knobs >
0 commit comments