I need help with stacked graph using Anychart function.
This is my code to display the graph
function StackedGraph() {
anychart.onDocumentReady(function () {
var getData = [];
$.ajax({
type: "POST",
url: "", // `retrieve data from another code that will get data from stored procedure using ssms`
async: false,
dataType: 'json',
success: function (data) {
$("#containerMaterial").html('');
$.each(data, function (index, item) {
var xValue = item.x;
var yValue = item.value;
//getData.push({"x": xValue, "value": yValue});
getData.push({"y": xValue, "value": yValue}); // sec values
});
` // code ...`
// Draw the chart
chart3.draw();
},
I wanted to display the stacked graph where it will get data from stored procedure, [“Place Name”, SumA, SumB]. i got to display only one of the values. however the values for the second one did not appeared.
New contributor
ayano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.