Hi,
I have a problem in the chart with data source and web service. The chart isn´t creating. Can anybody help me?
Thanks.
Obs: I use the Framework 3.5.
The code:
$("#chart").kendoChart({
theme: $(document).data("kendoSkin") || "Metro",
dataSource: {
transport: {
type: "odata",
read: {
url: "JSON.asmx/GetDashboard", //I tried to put "http://localhost:17844/WEB3/JSON.asmx/GetDashboard" too, but don´t created the chart
dataType: "json"
}
}
},
title: {
text: "Rentabilidade",
font: "<B>"
},
legend: {
visible: false
},
chartArea: {
background: "#e6e6e6",
margin: 0
},
seriesDefaults: {
type: "bar",
labels: {
visible: true,
position: "center",
format: "{0:P2}"
},
color: "#3B894E"
},
series:
[{
field: "VlValor",
name: "Rentabilidade (%)"
}],
categoryAxis: {
field: "DsFuncionario",
labels: {
rotation: 0,
padding: { right: 60 }
}
},
valueAxis: {
labels: {
visible: false
}
},
tooltip: {
visible: true,
format: "{0:P2}",
font: "<B>"
}
});
And the web service return a string: [{"DsFuncionario":"DIRECAO","VlValor":10135.33},{"DsFuncionario":"EDIR","VlValor":3201.59},{"DsFuncionario":"EMERSON ","VlValor":-76703.79},{"DsFuncionario":"FABIO","VlValor":3868.37},{"DsFuncionario":"SANDRO","VlValor":974631.58}]
I have a problem in the chart with data source and web service. The chart isn´t creating. Can anybody help me?
Thanks.
Obs: I use the Framework 3.5.
The code:
$("#chart").kendoChart({
theme: $(document).data("kendoSkin") || "Metro",
dataSource: {
transport: {
type: "odata",
read: {
url: "JSON.asmx/GetDashboard", //I tried to put "http://localhost:17844/WEB3/JSON.asmx/GetDashboard" too, but don´t created the chart
dataType: "json"
}
}
},
title: {
text: "Rentabilidade",
font: "<B>"
},
legend: {
visible: false
},
chartArea: {
background: "#e6e6e6",
margin: 0
},
seriesDefaults: {
type: "bar",
labels: {
visible: true,
position: "center",
format: "{0:P2}"
},
color: "#3B894E"
},
series:
[{
field: "VlValor",
name: "Rentabilidade (%)"
}],
categoryAxis: {
field: "DsFuncionario",
labels: {
rotation: 0,
padding: { right: 60 }
}
},
valueAxis: {
labels: {
visible: false
}
},
tooltip: {
visible: true,
format: "{0:P2}",
font: "<B>"
}
});
And the web service return a string: [{"DsFuncionario":"DIRECAO","VlValor":10135.33},{"DsFuncionario":"EDIR","VlValor":3201.59},{"DsFuncionario":"EMERSON ","VlValor":-76703.79},{"DsFuncionario":"FABIO","VlValor":3868.37},{"DsFuncionario":"SANDRO","VlValor":974631.58}]