I'm using jqplot to generate charts. It works fine when I define the source data in javascript:
var goog2 = [["6/22/2009", 425.32],["6/8/2009", 424.84],["5/26/2009", 417.23]];
I'm now trying to pull the data from a server side web method:
<WebMethod()> _
Public Shared Function Test() As String
Return ("[[""6/22/2009"",425.32],[""7/22/2009"",429.32]];")
End Function
No matter what I do to the returned object I can't seem to get it into the format that's required.
function DoAction2(cat) {
$.ajax({
type: "POST",
url: "AjaxTest.aspx/Test",
data: "{cat:" + cat + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
alert(msg.d);
var d = msg.d;
plot = $.jqplot('chart1', [d])
Any help would be appreciated.