hello !

voilà, après avoir suivis quelques tutoriel pour créer des charts avec chargement XML, je me suis lancé dans un petit dev, mais voilà comme je m'y attendais vu la taille de mon xml, bien plus complexe, quelques problèmes me parviennent..

Voici le programme (corps)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="dataRequest.send()">
 
<mx:HTTPService id="dataRequest" url="C:\testyear.xml" 
result="dataRequestResultHandler(event);"
fault="dataRequestFaultHandler(event);" />
 
<mx:Script>
    <![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
 
[Bindable]
private var stats:ArrayCollection;
private function dataRequestResultHandler(event:ResultEvent):void {
    stats = event.result.data.row;
}
 
private function dataRequestFaultHandler(event:FaultEvent):void {
    Alert.show(event.fault.message);
}
 
    ]]>
</mx:Script>
	<mx:TabNavigator x="93" y="50" width="964" height="550">
		<mx:Canvas label="Estavayer" width="100%" height="100%" barColor="#999999"
		borderColor="#919191" borderStyle="solid"
		backgroundColor="#C9C9C9" backgroundDisabledColor="#E7E7E7" themeColor="#FF0000">
	<mx:ColumnChart x="10" y="10" id="columnchart" dataProvider="{stats}" width="940" height="495">
 
	<mx:series>
    	<mx:ColumnSeries displayName="Expenses" yField="orderEntry"/>
    	<mx:ColumnSeries displayName="Revenue" yField="orderEntryBudget"/>
 
	</mx:series>
 
 
	<mx:horizontalAxis>
    		<mx:CategoryAxis dataProvider="{stats}" categoryField="name"/>
	</mx:horizontalAxis>
 
	</mx:ColumnChart>
 
		</mx:Canvas>
 
		<mx:Canvas label="Genéve" width="100%" height="100%" barColor="#999999"
		borderColor="#919191" borderStyle="solid"
		backgroundColor="#C9C9C9" backgroundDisabledColor="#E7E7E7" themeColor="#FF0000">
			<mx:ColumnChart x="10" y="10" id="columnchart2" dataProvider="{stats}" width="940" height="495">
 
	<mx:series>
    	<mx:ColumnSeries displayName="Expenses" yField="orderEntry"/>
    	<mx:ColumnSeries displayName="Revenue" yField="orderEntryBudget"/>
 
	</mx:series>
 
	<mx:horizontalAxis>
    		<mx:CategoryAxis dataProvider="{stats}" categoryField="name"/>
	</mx:horizontalAxis>
 
	</mx:ColumnChart>
	</mx:Canvas>
 
	<mx:Canvas label="Lausanne" width="100%" height="100%" barColor="#999999"
		borderColor="#919191" borderStyle="solid"
		backgroundColor="#C9C9C9" backgroundDisabledColor="#E7E7E7" themeColor="#FF0000">
 
	</mx:Canvas>
 
		<mx:Canvas label="Région4" width="100%" height="100%" barColor="#999999"
		borderColor="#919191" borderStyle="solid"
		backgroundColor="#C9C9C9" backgroundDisabledColor="#E7E7E7" themeColor="#FF0000">
 
 
	</mx:Canvas>
 
	</mx:TabNavigator>
	<mx:Legend dataProvider="{columnchart}" x="0" height="590"/>
 
</mx:WindowedApplication>
le XMl que je charge est le suivant :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?xml version="1.0" encoding="utf-8"?>
<years>
	<year name="2007">
		<month name="January">
			<region id="11">
				<orderEntry>250000</orderEntry>
				<orderEntryBudget>230000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>170000</orderEntry>
				<orderEntryBudget>180000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>275000</orderEntry>
				<orderEntryBudget>230000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>195000</orderEntry>
				<orderEntryBudget>200000</orderEntryBudget>
			</region>
		</month>
		<month name="February">
			<region id="11">
				<orderEntry>220000</orderEntry>
				<orderEntryBudget>260000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>210000</orderEntry>
				<orderEntryBudget>140000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>245000</orderEntry>
				<orderEntryBudget>260000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>225000</orderEntry>
				<orderEntryBudget>200000</orderEntryBudget>
			</region>
		</month>
		<month name="March">
			<region id="11">
				<orderEntry>220000</orderEntry>
				<orderEntryBudget>230000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>190000</orderEntry>
				<orderEntryBudget>180000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>235000</orderEntry>
				<orderEntryBudget>290000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>115000</orderEntry>
				<orderEntryBudget>150000</orderEntryBudget>
			</region>
		</month>
	</year>
	<year name="2008">
		<month name="January">
			<region id="11">
				<orderEntry>270000</orderEntry>
				<orderEntryBudget>210000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>140000</orderEntry>
				<orderEntryBudget>130000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>275000</orderEntry>
				<orderEntryBudget>280000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>155000</orderEntry>
				<orderEntryBudget>260000</orderEntryBudget>
			</region>
		</month>
		<month name="February">
			<region id="11">
				<orderEntry>260000</orderEntry>
				<orderEntryBudget>220000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>270000</orderEntry>
				<orderEntryBudget>240000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>275000</orderEntry>
				<orderEntryBudget>220000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>225000</orderEntry>
				<orderEntryBudget>260000</orderEntryBudget>
			</region>
		</month>
		<month name="March">
			<region id="11">
				<orderEntry>260000</orderEntry>
				<orderEntryBudget>280000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>130000</orderEntry>
				<orderEntryBudget>180000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>285000</orderEntry>
				<orderEntryBudget>260000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>165000</orderEntry>
				<orderEntryBudget>150000</orderEntryBudget>
			</region>
		</month>
	</year>
		<year name="2009">
		<month name="January">
			<region id="11">
				<orderEntry>230000</orderEntry>
				<orderEntryBudget>260000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>150000</orderEntry>
				<orderEntryBudget>170000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>225000</orderEntry>
				<orderEntryBudget>250000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>175000</orderEntry>
				<orderEntryBudget>240000</orderEntryBudget>
			</region>
		</month>
		<month name="February">
			<region id="11">
				<orderEntry>220000</orderEntry>
				<orderEntryBudget>270000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>250000</orderEntry>
				<orderEntryBudget>240000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>265000</orderEntry>
				<orderEntryBudget>290000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>265000</orderEntry>
				<orderEntryBudget>280000</orderEntryBudget>
			</region>
		</month>
		<month name="March">
			<region id="11">
				<orderEntry>280000</orderEntry>
				<orderEntryBudget>250000</orderEntryBudget>
			</region>
			<region id="21">
				<orderEntry>140000</orderEntry>
				<orderEntryBudget>150000</orderEntryBudget>
			</region>
			<region id="31">
				<orderEntry>235000</orderEntry>
				<orderEntryBudget>270000</orderEntryBudget>
			</region>
			<region id="41">
				<orderEntry>135000</orderEntry>
				<orderEntryBudget>120000</orderEntryBudget>
			</region>
		</month>
	</year>
</years>
j'essaie de simplement récuperer les informations suivantes : orderEntry et orderEntryBudjet, et les mettre dans le columnChart, donc simplement avoir ces deux informations placées sur le graphique, avant, une erreur s'affichait lorsque adobe air s'ouvrait, maintenant, il ne s'exécute même plus = / je ne sais plus trop quoi faire