Fusioncharts and Codecharge
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Fusioncharts and Codecharge Expand / Collapse
Author
Message
Posted 8/23/2007 6:56:32 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/17/2008 10:47:53 AM
Posts: 2, Visits: 15
Hi; thanks to someone's post on this subject, I was able to get the dataXML working with CodeCharge, but the dataURL does not seem to work... my code is listed below

My Chart.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="GENERATOR" content="CodeCharge Studio 3.2.0.2">
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>eDashboard</title>
<link rel="stylesheet" type="text/css" href="Styles/ACSezOrder/Style_doctype.css">
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="Styles/ACSezOrder/Style_ie6.css"><![endif]-->
<script language="Javascript" src="FusionCharts.js"></script>
</head>
<body>
</body>
</html>

Chart.asp code
============
<!-- #INCLUDE VIRTUAL="FusionCharts.asp" -->
...
...
'Fusion Chart Code
'Variable to contain dataURL
Dim strDataURL

'Set DataURL with animation property to 1
'NOTE: It's necessary to encode the dataURL if you've added parameters to it
'strDataURL = encodeDataURL("ChartsData.asp?animate=1")
strDataURL = "ChartData.asp"

'Create the chart - Pie 3D Chart with dataURL as strDataURL

Call renderChart("Column3D.swf", strDataURL, "", "stats", 600, 400, false, false)

and my ChartData.asp
==================

<%
dim statsdim rs
dim sqldim cn
dim field1 'Hold data returned
dim field2 'Hold name
dim strXML 'strXML will be used to store the entire XML document generated

'Default.asp has passed us a property animate. We request that.
Dim animateChart

animateChart = Request.QueryString("animate")
'Set default value of 1
if animateChart="" then
 animateChart = "1"
end if

'Make db conx
cn = "dns..."
set rs = server.createobject("adodb.recordset")

'Create your SQL here, this was mine
sql = "SELECT NBR_OPEN_INCIDENTS FROM DASHBOARD_VIEW"

'Start XML data
strXML = "<chart caption=' Current OMS Status' subCaption='Dashboard' pieSliceDepth='30' showBorder='0' formatNumberScale='0' numberSuffix=' Tickets' animation='0'>"

'Open db and grab records
rs.open sql, cn
do while not rs.eof
    'Write the data line str
    XML = strXML & "<set label='Open Incidents' value='20'/>"
    'Go to next record
    rs.movenext
loop

'Finally, close <chart> element
strXML = strXML & "</chart>"

'Close loop and conx
rs.closeSet
rs = nothing

'Set Proper output content-type
Response.ContentType = "text/xml"

'Just write out the XML data
'NOTE THAT THIS PAGE DOESN'T CONTAIN ANY HTML TAG, WHATSOEVER

Response.Write(strXML)
%>

the result can be seen at
http://open.acsatlanta.com/OMS/chart.asp

there is no data showing..

Would appreicate a fresh set of eyes...

Thanks

Post #2077
Posted 8/24/2007 2:24:34 AM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: Today @ 1:08:34 AM
Posts: 2,183, Visits: 515
I've not used CCS before - as such my reply would be partial and just relevant to FusionCharts side.

If you're getting an "Error in loading data" or other similar errors, I would recommend switching the debug mode of chart to on - that'll give you insight into as to what might be causing the chart not to work.

Thanks,
Pallav Nadhani
FusionCharts Team

Post #2085
Posted 1/1/2008 9:26:37 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 1/1/2008 9:38:37 AM
Posts: 13, Visits: 24
http://www.fusioncharts.com/forum/Topic469-30-1.aspx

Look here, it works well and can be replicated
Post #3568
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 5:46am


Execution: 0.109.