Sign in to follow this  
Pallav

Plotting a MSSeries chart from an Access Database

Recommended Posts

Trying to render a MSSeries chart through using DataXML method. Data is stored within a Access database. I have the tables already defined in my database and can pull them using a column2d or column3d.

What is the correct syntax / coding within the JS to pull the data from the different tables and render correctly? I tried working from the examples in the documentation but had no success.

Here is the code that I'm working from:

strXML = "<chart caption='Inventory of Activities - Previous Day' showBorder='0' formatNumberScale='0' labelDisplay='ROTATE' slantLabels='1' useRoundEdges='1'>"

 

 'Iterate through each factory

 strQuery = "select * from Actv_Master"

 Set oRs = oConn.Execute(strQuery)

 

 While Not oRs.Eof

'Now create second recordset to get details for this factory

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

strQuery = "select sum(Quantity) as TotOutput from Actv_HFD_Current where queueID=" & ors("queueID")

Set oRs2 = oConn.Execute(strQuery)

'Generate <set label='..' value='..' />

strXML = strXML & "<set label='" & ors("QueueName") & "' value='" & ors2("TotOutput") & "' />"

'Close recordset

Set oRs2 = Nothing

oRs.MoveNext

 Wend

 'Finally, close <chart> element

 strXML = strXML & "</chart>"

 Set oRs = nothing

 

 

 Call renderChart("../../FusionCharts/mscolumn3d.swf", "", strXML, "Chart_1", 900, 275, false, false)

Any help would be greatly appreciated.

Edited by Guest

Share this post


Link to post
Share on other sites

Yes I now the the goal is to combine the sources in the sytnax of the JS. However any type of coding I tried would just end with summing totals into the chart and not plot any type of MS series.

Can you give an example of what the code needs to look like to render correctly?

Considiering the use of Multiple Series types of charts. I was very surprised there is not a working example/sample of an MS series chart when pulling from an external data source.

Share this post


Link to post
Share on other sites

We do have a lot of examples for MS chart in our doc (Code folder) and the even more complex examples in our blueprint applications (open source; in multiple programming languages).

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