@@ -9,37 +9,46 @@ import { useArena } from "../src/useArena";
9
9
const { local , build , vduiLocal , vduiBuild , toggleTable } = useArena ()
10
10
11
11
const 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 ],
25
34
]);
26
-
35
+
27
36
const model = ref ([
28
37
{ key: ' userOptions.show' , def: true , type: ' checkbox' },
29
38
{ key: ' userOptions.buttons.pdf' , def: true , type: ' checkbox' },
30
39
{ key: ' userOptions.buttons.csv' , def: true , type: ' checkbox' },
31
40
{ key: ' userOptions.buttons.img' , def: true , type: ' checkbox' },
32
41
{ key: ' userOptions.buttons.table' , def: true , type: ' checkbox' },
33
42
{ 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' },
37
46
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' },
41
50
{ key: ' userOptions.print.backgroundColor' , def: ' #FFFFFF' },
42
-
51
+
43
52
{ key: ' style.fontFamily' , def: ' inherit' , type: ' text' },
44
53
{ key: ' style.chart.backgroundColor' , def: ' #FFFFFF20' , type: ' color' },
45
54
{ key: ' style.chart.color' , def: ' #1A1A1A' , type: ' color' },
@@ -62,7 +71,7 @@ const model = ref([
62
71
{ key: ' style.chart.nodes.labels.abbreviation.use' , def: true , type: ' checkbox' },
63
72
{ key: ' style.chart.nodes.labels.abbreviation.length' , def: 3 , type: ' number' , min: 1 , max: 12 },
64
73
{ 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 },
66
75
{ key: ' style.chart.links.opacity' , def: 0.8 , type: ' number' , min: 0 , max: 1 , step: 0.1 },
67
76
{ key: ' style.chart.links.stroke' , def: ' #FFFFFF' , type: ' color' },
68
77
{ key: ' style.chart.links.strokeWidth' , def: 1 , type: ' number' , min: 0 , max: 12 },
@@ -95,7 +104,7 @@ const config = computed(() => {
95
104
... c .style .chart .nodes ,
96
105
labels: {
97
106
... c .style .chart .nodes .labels ,
98
- formatter : ({value, config}) => {
107
+ formatter : ({ value, config }) => {
99
108
// console.log(config)
100
109
return ` f | ${ value} `
101
110
}
@@ -125,7 +134,7 @@ const step = ref(0);
125
134
<template #local >
126
135
<LocalVueUiFlow :dataset =" dataset" :config =" config" :key =" `local_${step}`" ref =" local" >
127
136
<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 )" />
129
138
</template >
130
139
131
140
<template #optionPdf >
@@ -139,22 +148,26 @@ const step = ref(0);
139
148
</template >
140
149
<template #source >
141
150
<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.
143
154
</div >
144
- </template >
155
+ </template >
145
156
</LocalVueUiFlow >
146
157
</template >
147
158
148
159
<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 >
150
162
</template >
151
163
152
164
<template #build >
153
165
<VueUiFlow :dataset =" dataset" :config =" config" :key =" `build_${step}`" ref =" build" ></VueUiFlow >
154
166
</template >
155
167
156
168
<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 >
158
171
</template >
159
172
160
173
<template #knobs >
0 commit comments