Foros del Web » Programando para Internet » ASP Clásico »

graficar datos

Estas en el tema de graficar datos en el foro de ASP Clásico en Foros del Web. Tengo una tabla con tres campos: MES, MERCADO Y TOTAL; Quisiera graficar el contenido de esa tabla. Donde, puede contener los siguientes datos: MES MERCADO ...
  #1 (permalink)  
Antiguo 09/08/2002, 14:56
 
Fecha de Ingreso: junio-2002
Mensajes: 37
Antigüedad: 22 años, 10 meses
Puntos: 0
graficar datos

Tengo una tabla con tres campos: MES, MERCADO Y TOTAL;

Quisiera graficar el contenido de esa tabla.
Donde, puede contener los siguientes datos:
MES MERCADO TOTAL
________________________
ENE CLOSED 453141
ENE CLOMPLETED 525
ENE RELEASED 3
FEB CLOSED 53242
FEB RELEASED 324
MAR COMPLETED 52525
etc.

Como lo hago?
  #2 (permalink)  
Antiguo 09/08/2002, 15:04
 
Fecha de Ingreso: enero-2002
Ubicación: Yerba Buena - Tucumán
Mensajes: 259
Antigüedad: 23 años, 4 meses
Puntos: 0
Re: graficar datos

A que te referís con graficar ???
A gráficas de barras, tortas ... ??? o a que ???

Podrías explicarlo mejor ???

Saludos ;)

<center><font face=Verdana size=2>Webmaster de [/CODE]<A href="http://www.salirxtucuman.com.ar" target="_blank"><img src="http://www.efrance.fr/salirxtucuman/images/titulo.gif" border=0 align="absmiddle"></a></center>
  #3 (permalink)  
Antiguo 09/08/2002, 15:08
 
Fecha de Ingreso: junio-2002
Mensajes: 37
Antigüedad: 22 años, 10 meses
Puntos: 0
Re: graficar datos

Habia pensado graficas de barras, pero no se si sea lo mas optimo, sabes algo?

Gracias
  #4 (permalink)  
Antiguo 09/08/2002, 15:30
 
Fecha de Ingreso: enero-2002
Ubicación: Yerba Buena - Tucumán
Mensajes: 259
Antigüedad: 23 años, 4 meses
Puntos: 0
Re: graficar datos

Te paso algunas ideas:

- Una forma es hacerlo a mano con HTML. La idea sería utilizar tablas en donde asignes a cada fila dos celdas, una con un width con el porcentaje que obtengas de el cálculo que realices de los datos que tengas y otra celda con el resto del porcentaje. Es mas o menos la idea

-La otra forma es utilizart algún componente que haga gráficos. Los podés bajar de:
www.aspobjects.com o de
www.hotscripts.com

Saludos ;)

<center><font face=Verdana size=2>Webmaster de [/CODE]<A href="http://www.salirxtucuman.com.ar" target="_blank"><img src="http://www.efrance.fr/salirxtucuman/images/titulo.gif" border=0 align="absmiddle"></a></center>
  #5 (permalink)  
Antiguo 09/08/2002, 15:47
 
Fecha de Ingreso: julio-2002
Mensajes: 219
Antigüedad: 22 años, 10 meses
Puntos: 0
Re: graficar datos

Si te refieres a colocar los datos tipo tabla en panatalla.

&lt;%@ Language=VBScript %&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;%
'Obtener los datos de la tabla
'Variables a usar
Dim objCon, strSQL

'Conectar a la Base de datos
Set objCon = Server.CreateObject(&quot;ADODB.Connection&quot;)
objCon.Open(&quot;DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=&quot; &amp; Server.MapPath(&quot;BDPrueba.mdb&quot;))

'Obtener todos los datos de la tabla &quot;MiTabla&quot;
strSQL = &quot;SELECT * FROM MiTabla&quot;
Set RS = objCon.Execute(strSQL)

%&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#e6e6e6&quot; borderColor=&quot;#cccccc&quot; width=&quot;800&quot;&gt;
&lt;tr&gt;
&lt;th class=&quot;columnHdr&quot; id=&quot;contextualnav&quot; align=&quot;center&quot; bgcolor=&quot;#336699&quot; nowrap&gt;
&lt;font color=&quot;#FFFFFF&quot;&gt;
&amp;nbsp;MES&amp;nbsp;
&lt;/font&gt;
&lt;/th&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; bgcolor=&quot;#336699&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;1&quot; bgcolor=&quot;#cccccc&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; bgcolor=&quot;#336699&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;th class=&quot;columnHdr&quot; id=&quot;contextualnav&quot; align=&quot;center&quot; bgcolor=&quot;#336699&quot; nowrap&gt;
&lt;font color=&quot;#FFFFFF&quot;&gt;
&amp;nbsp;MERCADO&amp;nbsp;
&lt;/font&gt;
&lt;/th&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; bgcolor=&quot;#336699&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;1&quot; bgcolor=&quot;#cccccc&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; bgcolor=&quot;#336699&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;th class=&quot;columnHdr&quot; id=&quot;contextualnav&quot; align=&quot;center&quot; bgcolor=&quot;#336699&quot; nowrap&gt;
&lt;font color=&quot;#FFFFFF&quot;&gt;
&amp;nbsp;TOTAL&amp;nbsp;
&lt;/font&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/b&gt;
&lt;%
while (not RS.Eof)
Dim vMes, vMercado, vTotal
vacio = false

vMes = RS(&quot;mes&quot;)
vMercado = RS(&quot;mercado&quot;)
vTotal = RS(&quot;total&quot;)

RS.MoveNext
%&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;#e6e6e6&quot; align=&quot;center&quot;&gt;
&lt;font color=&quot;#000000&quot;&gt;
&lt;%=vMes%&gt;
&lt;/font&gt;
....continua
  #6 (permalink)  
Antiguo 09/08/2002, 15:48
 
Fecha de Ingreso: julio-2002
Mensajes: 219
Antigüedad: 22 años, 10 meses
Puntos: 0
Re: graficar datos

&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;1&quot; bgcolor=&quot;#cccccc&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td bgcolor=&quot;#e6e6e6&quot; align=&quot;center&quot;&gt;
&lt;font color=&quot;#000000&quot;&gt;
&lt;%=vTotal%&gt;
&lt;/font&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;%
if (not RS.Eof) then
%&gt;
&lt;tr&gt;
&lt;td height=&quot;1&quot; colspan=&quot;9&quot; bgcolor=&quot;#cccccc&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;%
end if
wend
if (vacio) then
%&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;#e6e6e6&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;1&quot; bgcolor=&quot;#cccccc&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td bgcolor=&quot;#e6e6e6&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;1&quot; bgcolor=&quot;#cccccc&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td height=&quot;1&quot; width=&quot;4&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;4&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;td bgcolor=&quot;#e6e6e6&quot; nowrap&gt;&lt;spacer type=&quot;block&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;%
end if
'Cerrando la conexión con la base de datos y destruyendo los registros
objCon.Close
Set RS = nothing
Set objCon = nothing
%&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;

Espero te sirva.
  #7 (permalink)  
Antiguo 09/08/2002, 16:42
Avatar de bakanzipp  
Fecha de Ingreso: noviembre-2001
Ubicación: santiago de shilli
Mensajes: 2.554
Antigüedad: 23 años, 5 meses
Puntos: 0
Re: graficar datos

un ejemplito sencillo

<a href='ir.asp?http://www.webexperto.com/articulos/articulo.asp?cod=11' target='_blank'>http://www.webexperto.com/articulos/arti...</a>


<center><font face=verdana size=1 color=blue>¸„.-·~¹°”ˆ˜¨Bakanzipp¨˜ˆ”°¹~·-.„¸[/CODE]</center>
  #8 (permalink)  
Antiguo 09/08/2002, 18:25
Avatar de RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años, 3 meses
Puntos: 50
Re: graficar datos

Blanca Yuri..?no te había ya mandado a tu correo ese ejemplo..?? o es otra cosa..??

Saludos...!! ;)


<html><center><embed src="http://www.angelfire.com/on/cobainss/Movie1.swf" height=80 width=200><BR></embed></center></html>
  #9 (permalink)  
Antiguo 10/08/2002, 01:15
 
Fecha de Ingreso: julio-2002
Mensajes: 50
Antigüedad: 22 años, 9 meses
Puntos: 0
Re: graficar datos

Hola
Para mostrar gráficamente los datos yo estoy utilizando un Applet de Barras que es muy facil de usar
Puedes bajartelo de:
http://perso.wanadoo.es/jordi.escola

Un Saludo
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:51.