Sign in to follow this  
FusionCharts Support

Update Two Charts

Recommended Posts

How to click a graphic and play him the information in the graph DIR for GER.
 
Two Graphic Pizza.
 
==========================
 
default.asp
 
<% @LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>VOI - VIAGENS OI</title>

</head>

<script language="javascript" src="/Fusioncharts/JSClass/FusionCharts.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body >

<div id="divbolha">
<div id="Div_Donutts_Hotel">

<script type="text/javascript">

var chart = new FusionCharts("/FusionCharts/Charts/Pie2D.swf", "Dir", "320", "300", "0", "0");

var uRl = escape("xml_dir.asp?currTime=" + getTimeForURL());

chart.setDataURL(uRl);

chart.render("Div_Donutts_Hotel");

</script>

</div>

<div id="Div_DonPass">

<script type="text/javascript">

var chart = new FusionCharts("/FusionCharts/Charts/Pie2D.swf", "Ger4", "320", "300", "0", "0");

var uRl = escape("xml_ger.asp?currTime=" + getTimeForURL());

chart.setDataURL(uRl);

chart.render("Div_DonPass");

</script>

</div>

 

</div>

</body>
</html>
 
 
===========================================
 
Ger.asp
 
<%@LANGUAGE="VBSCRIPT"%>

<!--#include virtual="/Connections/VOI.asp" -->

<%

Dim Riscos__MMCOLPARAM

Riscos__MMCOLPARAM = "Ger"

If (Request("Ger")  <> "") Then

  Riscos__MMCOLPARAM = Request("Ger")

End If

%>

<%

Dim Riscos

Dim Riscos_numRows

Set Riscos = Server.CreateObject("ADODB.Recordset")

Riscos.ActiveConnection = MM_VOI_STRING

Riscos.Source = "Select Count(tbl.g_gerencia_n4) as Total,tbl.g_gerencia_n4 as Gerencia FROM tbl_login tbl, Tbl_Viagem tbv  WHERE tbv.id_solicitante_viagem = tbl.g_id_unico and tbv.status_viagem in ('Finalizado') AND tbl.g_gerencia_n4 = '" + Replace(Riscos__MMCOLPARAM, "'", "''") + "' AND Datepart(month,data_fim_viagem) = Datepart(month,getdate()) Group By tbl.g_gerencia_n4"

Riscos.CursorType = 0

Riscos.CursorLocation = 2

Riscos.LockType = 1

Riscos.Open()

Riscos_numRows = 0

%>

<?xml version="1.0" encoding="iso-8859-1"?>

<chart palette="2">

<%Do While not Riscos.EOF%>

<set label ='<%=Riscos("Gerencia")%>' value ='<%=Riscos("Total")%>'  />

<%Riscos.MoveNext : Loop%> 

</chart>

<%

Riscos.Close()

Set Riscos = Nothing

%>

 
=================================================
 
Dir.asp
 
<%@LANGUAGE="VBSCRIPT"%>

<!--#include virtual="/Connections/VOI.asp" -->

<%

Dim Riscos

Dim Riscos_numRows

Set Riscos = Server.CreateObject("ADODB.Recordset")

Riscos.ActiveConnection = MM_VOI_STRING

Riscos.Source = "Set Dateformat DMY Select Count(tbl.g_diretoria) as Total,tbl.g_diretoria as Diretoria FROM tbl_login tbl, Tbl_Viagem tbv  WHERE tbv.id_solicitante_viagem = tbl.g_id_unico and tbv.status_viagem in ('Finalizado') AND tbl.g_diretoria = 'DIR ADMINISTRATIVO' AND Datepart(month,data_fim_viagem) = Datepart(month,getdate()) Group By tbl.g_diretoria"

Riscos.CursorType = 0

Riscos.CursorLocation = 2

Riscos.LockType = 1

Riscos.Open()

Riscos_numRows = 0

%>

<?xml version="1.0" encoding="iso-8859-1"?>

<chart palette="2">

 

<%Do While not Riscos.EOF%>

<set label ='<%=Riscos("Diretoria")%>' value ='<%=Riscos("Total")%>' link='javaScript:updateChart("<%=Riscos("Diretoria")%>")' />

<%Riscos.MoveNext : Loop%> 

 

</chart>

<%

Riscos.Close()

Set Riscos = Nothing

%>

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this