I have created a simple test from your examples
test.json is a file that contains
[{"AgentsNames":["person 1"],"Program":"GOLD","SignupCount":1},{"AgentsNames":["person 2","person 3"],"Program":"No Program","SignupCount":2}]
that works perfectly
but when I change the url to "datastream.aspx?r=SIGNUPCOUNT" it doesnt work. This page responds with that JSON string
I've confirmed that it writes
[{"AgentsNames":["person 1"],"Program":"GOLD","SignupCount":1},{"AgentsNames":["person 2","person 3"],"Program":"No Program","SignupCount":2}]
that is also the source in the browser when I call the page directly. I've tried various parameters in the transport type: "GET" but nothing seems to work.
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
></
title
>
<
link
href
=
"../Styles/kendo.common.css"
rel
=
"Stylesheet"
/>
<
link
href
=
"../Styles/kendo.default.css"
rel
=
"Stylesheet"
/>
<
script
src
=
"../Scripts/kendo/jquery.min.js"
></
script
>
<
script
src
=
"../Scripts/kendo/kendo.core.js"
></
script
>
<
script
src
=
"../Scripts/kendo/kendo.data.js"
></
script
>
<
script
src
=
"../Scripts/kendo/kendo.chart.js"
></
script
>
</
head
>
<
body
>
<
div
id
=
"example"
class
=
"k-content"
>
<
div
>
<
div
id
=
"chart"
></
div
>
</
div
>
<
script
type
=
"text/javascript"
>
function createChart() {
$("#chart").kendoChart({
theme: $(document).data("kendoSkin") || "default",
dataSource: {
transport: {
read: {
url: "test.json",
dataType: "json"
}
},
sort: {
field: "Program",
dir: "asc"
}
},
title: {
text: "Signup Count"
},
legend: {
position: "bottom"
},
seriesDefaults: {
type: "pie",
labels: {
template: "${ value } - ${ category }",
visible: true
}
},
series: [{
field: "SignupCount",
categoryField: "Program"
}],
tooltip: {
visible: false
}
});
}
$(document).ready(function () {
setTimeout(function () {
createChart();
// Initialize the chart with a delay to make sure
// the initial animation is visible
}, 400);
$(document).bind("kendo:skinChange", function (e) {
createChart();
});
});
</
script
>
</
div
>
</
body
>
</
html
>
test.json is a file that contains
[{"AgentsNames":["person 1"],"Program":"GOLD","SignupCount":1},{"AgentsNames":["person 2","person 3"],"Program":"No Program","SignupCount":2}]
that works perfectly
but when I change the url to "datastream.aspx?r=SIGNUPCOUNT" it doesnt work. This page responds with that JSON string
MemoryStream stream = GPCO.JSON.Serialize(stats.Programs);
string
response = GPCO.Convert.BytesToUTF8(stream.GetBuffer());
Response.Clear();
Response.ContentType =
"application/json"
;
Response.Write(response);
I've confirmed that it writes
[{"AgentsNames":["person 1"],"Program":"GOLD","SignupCount":1},{"AgentsNames":["person 2","person 3"],"Program":"No Program","SignupCount":2}]
that is also the source in the browser when I call the page directly. I've tried various parameters in the transport type: "GET" but nothing seems to work.