There are several things you have to look at. First JSON. You need to know the structure of your JSON string. For instance you can create a JSON string like this:
{"name":"Tom", "sales":200}
Or if it is many names and sales then use an array like this:
{"names":["Tom", "Harry"], "sales":[200, 100]}
Then to access these values in JavScript...suppose you had the JSON object like this:
var myJSON = {"names":["Tom", "Harry"], "sales":[200, 100]};
document.write(myJSON.names[0]); //print out Tom
document.write(myJSON.sales[0]); //200
Since you want to use AJAX to get this JSON object then you can create an ASP page that simply returns a JSON String in the right format. For example:
Set rs = Conn.Execute("SELECT name, sales FROM employees")
If Not rs.EOF Then
Response.Write "{'names':["
Do Until rs.EOF
Response.Write rs("name")
Response.Write ","
rs.MoveNext
Loop
rs.Close : Set rs = Nothing : Conn.Close : Set Conn = Nothing
Response.Write "]}"
%>
Disclaimer: This is not tested code, I have not written classic ASP in almost 10 years! For instance, make sure that a final , is not printed etc.
Now, this link has some examples of loading data with AJAX and updating the graph. So you have to modify the URL to point to your asp page that generates the JSON string and modify the onDataRecieved function to add the data according to your own structure.
I hope this helps a little.