Bonjour,
J'utilise OWC pour générer des graphs.
J'ai une balise select qui permet de choisir le type de graphe
Et plus loin, j'ai ça :
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 <FORM action="chart.asp" method=post name=frmChooseOrg> <p>Type de graphique : <SELECT name=Graphs> <option <%if Request.Form("Graphs") = "1" then Response.Write "selected"%> value="1">chChartTypeColumnClustered</option> <option <%if Request.Form("Graphs") = "2" then Response.Write "selected"%> value="2">chChartTypeBarClustered</option> <option <%if Request.Form("Graphs") = "3" then Response.Write "selected"%> value="3">chChartTypeLine</option> <option <%if Request.Form("Graphs") = "4" then Response.Write "selected"%> value="4">chChartTypeLineMarkers</option> <option <%if Request.Form("Graphs") = "5" then Response.Write "selected"%> value="5">chChartTypeSmoothLine</option> <option <%if Request.Form("Graphs") = "6" then Response.Write "selected"%> value="6">chChartTypeSmoothLineMarkers</option> <option <%if Request.Form("Graphs") = "7" then Response.Write "selected"%> value="7">chChartTypePie</option> <option <%if Request.Form("Graphs") = "8" then Response.Write "selected"%> value="8">chChartTypeArea</option> <option <%if Request.Form("Graphs") = "9" then Response.Write "selected"%> value="9">chChartTypeDoughnut</option> <option <%if Request.Form("Graphs") = "10" then Response.Write "selected"%> value="10">chChartTypeRadarLine</option> <option <%if Request.Form("Graphs") = "11" then Response.Write "selected"%> value="11">chChartTypeRadarSmoothLine</option> </SELECT> <INPUT type="submit" value="Go"></p> </FORM>
Mais, pour que le nouveau choix soit pris en compte, il faut que j'actualise la page.
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 ..... TypeGraph = Request.Form("Graphs") ' Add a chart and set parameters for the chart oChart.Charts.Add select case TypeGraph case "1" oChart.Charts(0).Type = oChart.Constants.chChartTypeColumnClustered case "2" oChart.Charts(0).Type = oChart.Constants.chChartTypeBarClustered case "3" oChart.Charts(0).Type = oChart.Constants.chChartTypeLine case "4" oChart.Charts(0).Type = oChart.Constants.chChartTypeLineMarkers case "5" oChart.Charts(0).Type = oChart.Constants.chChartTypeSmoothLine case "6" oChart.Charts(0).Type = oChart.Constants.chChartTypeSmoothLineMarkers case "7" oChart.Charts(0).Type = oChart.Constants.chChartTypePie case "8" oChart.Charts(0).Type = oChart.Constants.chChartTypeArea case "9" oChart.Charts(0).Type = oChart.Constants.chChartTypeDoughnut case "10" oChart.Charts(0).Type = oChart.Constants.chChartTypeRadarLine case "11" oChart.Charts(0).Type = oChart.Constants.chChartTypeRadarSmoothLine end select .....
Quelqu'un(e) aurait-il déjà eu à résoudre ce problème ?
Merci.
Partager