I would really really appreciate some help! Below code works and data is fetched from DB and presented using line.swf
I have used these files DBConn.asp, FusionCharts_Gen.asp, FusionCharts.asp, Default.asp, PieData.asp to make it work.
As you see I have changed PieData.asp a bit to suit my needs. Now I need to use the multi series line 2d chart in order to present some more data.
How is that done??? Could someone please give an example of how below code would have to be modified... Please don't refer to the blueprints because they don't really help me much... ![]()
I am not expert here (suprise! :w00t:) so please bear with me.
Thanks very much to anyone taking the time to look into this for me.
Kindest regards
Peter
' Define chart attributes
strParam="caption=HbA1c;subCaption=By Visit; xAxisName=Visit; yAxisName=HbA1c %; canvasRightMargin=20; canvasPadding=20; showValues=1; adjustDiv=0; numDivLines=5; yAxisMinValue=4; yAxisMaxValue=16; showBorder=0; showLabels=1; labelDisplay=Rotate; slantLabels=1; palette=3"
'Set chart attributes
Call FC.setChartParams(strParam)
' Fetch all records usins SQL Query
' Store chart data values in 'total' column/field and category names in 'FactoryName'
dim strQuery
strQuery = "SELECT G.PT, G.CPEVENT, G.LVALUE FROM NN304_3511$CURRENT.GLUCLATE G Where LPARM_CODE = 'HBA1C_BLOOD' AND PT = '200001'"
Dim oRs
'Create the recordset to retrieve data
Set oRs = Server.CreateObject("ADODB.Recordset")
Set oRs = oConn.Execute(strQuery)
'Pass the SQL Query result to the FusionCharts ASP Class function
'along with field/column names that are storing chart values and corresponding category names
'to set chart data from database
If Not oRs.bof Then
Call FC.addDataFromDatabase(oRs, "LVALUE", "CPEVENT", "", "")
End If
oRs.Close
set oRs=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(FC.getXML())

Back to top
MultiQuote
