Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Langages serveur > ASP
ASP Forum sur la programmation ASP. Avant de poster : Cours ASP, FAQ ASP
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 03/07/2007, 15h15   #1
Membre du Club
 
Avatar de mattyeux
 
Étudiant
Inscription : décembre 2006
Messages : 167
Détails du profil
Informations personnelles :
Âge : 26

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : décembre 2006
Messages : 167
Points : 64
Points : 64
Par défaut Faire des graphiques en ASP

Bonjour,

Est ce que quelqu'un connaitrait une librairie ASP (où a la limite javascript) permettant de générer des graphique du style histogramme, courbes ou camenbert ?

Je cherche de préférence quelquechose de gratuit et de sympa visuellement ...

Merci
mattyeux est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/07/2007, 15h21   #2
Membre du Club
 
Avatar de mattyeux
 
Étudiant
Inscription : décembre 2006
Messages : 167
Détails du profil
Informations personnelles :
Âge : 26

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : décembre 2006
Messages : 167
Points : 64
Points : 64
Ok honte à moi jviens de lire des topics du dessous et j'ai vu OWC... Jvais voir ce que je peux en faire
mattyeux est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 05/07/2007, 18h15   #3
Membre actif
 
Inscription : avril 2004
Messages : 202
Détails du profil
Informations personnelles :
Âge : 36

Informations forums :
Inscription : avril 2004
Messages : 202
Points : 192
Points : 192
bonjour,

sauf que cela te coute une licence Office, non ?
perso, j'utilise le très bon ChartGallery (http://www.advsofteng.com/gallery.html) qui ne coute que 100$ (donc pas beaucoup en €)

très souple, il permet de faire à peu près tout ce que l'on veut

Nico.
__________________
Nico, l'agrotic géomatic
agrotic est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/07/2007, 14h55   #4
Membre du Club
 
Avatar de mattyeux
 
Étudiant
Inscription : décembre 2006
Messages : 167
Détails du profil
Informations personnelles :
Âge : 26

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : décembre 2006
Messages : 167
Points : 64
Points : 64
merci agrotic pour ta réponse.

j'ai essayer d'installer ChartGallery mais j'ai des droits assez restreint sur mon poste dans ma boite ... Et je ne peux pas l'installer ...

Cependant, j'ai trouvé une solution sur le net. En gros, le graphique est un tableau, dont on colorie les cases selon les valeurs données... Ca rend pas trop moche, mais je ne peux faire que des histogramme (pas de courbes ni de camembert )

Voila.

Je poste le code de cette fonction

Code :
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
<%
Sub ShowChart(ByRef aValues, ByRef aLabels, ByRef strTitle, ByRef strXAxisLabel, ByRef strYAxisLabel)
	' Some user changable graph defining constants
	' All units are in screen pixels
	Const GRAPH_WIDTH  = 300  ' The width of the body of the graph
	Const GRAPH_HEIGHT = 175  ' The height of the body of the graph
	Const GRAPH_BORDER = 1    ' The size of the black border
	Const GRAPH_SPACER = 1    ' The size of the space between the bars
 
	' Debugging constant so I can easily switch on borders in case
	' the tables get messed up.  Should be left at zero unless you're
	' trying to figure out which table cells doing what.
	Const TABLE_BORDER = 0
	'Const TABLE_BORDER = 10
 
	' Declare our variables
	Dim I
	Dim iMaxValue
	Dim iBarWidth
	Dim iBarHeight
 
	' Get the maximum value in the data set
	iMaxValue = 0
	For I = 0 To UBound(aValues)
		If iMaxValue < aValues(I) Then iMaxValue = aValues(I)
	Next 'I
	'Response.Write iMaxValue ' Debugging line
 
 
	' Calculate the width of the bars
	' Take the overall width and divide by number of items and round down.
	' I then reduce it by the size of the spacer so the end result
	' should be GRAPH_WIDTH or less!
	iBarWidth = (GRAPH_WIDTH \ (UBound(aValues) + 1)) - GRAPH_SPACER
	'Response.Write iBarWidth ' Debugging line
 
 
	' Start drawing the graph
	%> 
	<table class="chart" BORDER="<%= TABLE_BORDER %>" CELLSPACING="0" CELLPADDING="0">
		<tr class="chart">
			<td class="chart" COLSPAN="3" ALIGN="center"><H4><%= strTitle %></H4></TD>
		</tr>
		<tr class="chart">
			<td class="chart" VALIGN="center"><%= strYAxisLabel %></TD>
			<td class="chart">
				<table class="chart" BORDER="<%= TABLE_BORDER %>" CELLSPACING="0" CELLPADDING="0">
					<tr class="chart">
						<td class="chart" ROWSPAN="2"><IMG SRC="./images/spacer.jpg" BORDER="0" WIDTH="1" HEIGHT="<%= GRAPH_HEIGHT %>"></TD>
						<td class="chart" VALIGN="top" ALIGN="right"><%= iMaxValue %>&nbsp;</TD>
					</tr>
					<tr class="chart">
						<td class="chart" VALIGN="bottom" ALIGN="right">0&nbsp;</TD>
					</tr>
				</table>
			</td>
			<td class="chart">
				<table class="chart" BORDER="<%= TABLE_BORDER %>" CELLSPACING="0" CELLPADDING="0">
					<tr class="chart">
						<td class="chart" VALIGN="bottom"><IMG SRC="./images/spacer_black.jpg" BORDER="0" WIDTH="<%= GRAPH_BORDER %>" HEIGHT="<%= GRAPH_HEIGHT %>"></TD>
					<%
					' We're now in the body of the chart.  Loop through the data showing the bars!
					For I = 0 To UBound(aValues)
						iBarHeight = Int((aValues(I) / iMaxValue) * GRAPH_HEIGHT)
 
						' This is a hack since browsers ignore a 0 as an image dimension!
						If iBarHeight = 0 Then iBarHeight = 1
					%>
						<td class="chart" VALIGN="bottom"><IMG SRC="./images/spacer.jpg" BORDER="0" WIDTH="<%= GRAPH_SPACER %>" HEIGHT="1"></TD>
						<td class="chart" VALIGN="bottom"><IMG SRC="./images/spacer_red.jpg" BORDER="0" WIDTH="<%= iBarWidth %>" HEIGHT="<%= iBarHeight %>" ALT="<%= aValues(I) %>"></TD>
					<%
					Next 'I
					%>
					</tr>
					<!-- I was using GRAPH_BORDER + GRAPH_WIDTH but it was moving the last x axis label -->
					<tr class="chart">
						<td class="chart" COLSPAN="<%= (2 * (UBound(aValues) + 1)) + 1 %>"><IMG SRC="./images/spacer_black.jpg" BORDER="0" WIDTH="<%= GRAPH_BORDER + ((UBound(aValues) + 1) * (iBarWidth + GRAPH_SPACER)) %>" HEIGHT="<%= GRAPH_BORDER %>"></TD>
					</tr>
				<% ' The label array is optional and is really only useful for small data sets with very short labels! %>
				<% If IsArray(aLabels) Then %>
					<tr class="chart">
						<td class="chart"><!-- Spacing for Left Border Column --></TD>
					<% For I = 0 To UBound(aValues)  %>
						<td class="chart"><!-- Spacing for Spacer Column --></TD>
						<td class="chart" ALIGN="center"><FONT SIZE="1"><%= aLabels(I) %></FONT></TD>
					<% Next 'I %>
					</tr>
				<% End If %>
				</table>
			</td>
		</tr>
		<tr class="chart">
			<td class="chart" COLSPAN="2"><!-- Place holder for X Axis label centering--></TD>
			<td class="chart" ALIGN="center"><BR><%= strXAxisLabel %></TD>
		</tr>
	</table>
	<%
End Sub
%>
 
 
<%ShowChart array(5,10,12,5,3,2), array(truc1, truc2, truc3, truc4, truc5, truc6), "titre", "libelleX", "libelleY"%>
mattyeux est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 21h11.


 
 
 
 
Partenaires

Hébergement Web