I want to create a Stacked bar chart like http://bl.ocks.org/mbostock/3886208 . But I don\'t want to use CSV file.
How can I create Stacked chart using array or JSON dat
If you have an array, data
, you can use that just like the parameter data
in the csv function in the example you linked. The code within that function will work as expected, provided that your data is in the same format.
If you can set breakpoints with your browser, you can have a look at what that format is fairly easily, set one just inside the csv function call in the js and look at the data variable.