I have a data file, named data.js which is like this :
For working in fiddle, I have used this data in the main code only, but otherwise it is form of data.js
var data = [{
year: "first",
redDelicious: "10",
mcintosh: "0",
oranges: "19"
}, {
year: "second",
redDelicious: "12",
mcintosh: "0",
oranges: "15"
}, {
year: "third",
redDelicious: "05",
mcintosh: "0",
oranges: "28"
}, {
year: "fourth",
redDelicious: "14",
mcintosh: "0",
oranges: "12"
},
];
As we can see, mcintosh is zero in all the cases, this is how, it is initialized. I want to update this mcintosh, every time I run a function which will generate the value to be updated into mcintosh. I am using this to make stacked bar chart where value mcintosh will be stacked on redDelicious on it. Working fiddle for above work is here where you will get the stacked bar chart.