phlk Report post Posted April 18, 2009 Hi all, 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()) Share this post Link to post Share on other sites
Rahul Kumar Report post Posted April 20, 2009 Hi, To work with multi-series charts: 1. Add Category names: addCategoryFromDatabase(oRs, "LVALUE") 2. Add Dataset series names and Value: Call FC.addDatasetsFromDatabase (oRs, "{dataset series field}", "{Value field}", "", "") Please refer to this for more information: http://www.fusioncharts.com/docs/Contents/ASPClassAPI/Functions.html#dbhandling Share this post Link to post Share on other sites
phlk Report post Posted April 23, 2009 Thanks very much! Got it now :-) Kind regards Peter Share this post Link to post Share on other sites
FusionCharts Support Report post Posted April 23, 2009 nice to hear it worked!:w00t: Share this post Link to post Share on other sites