Currently I have two arrays, one is a list of numbers titled nums, and the ms is a list of strings titled places.
Ex.
nums=[1,2,3,4,5]
places = ["house","gym", "work", "school", "park"]
both arrays are the same length.
I want to make a bar chart with these arrays that looks similar to http://bl.ocks.org/mbostock/3885304, but the data is coming from these arrays rather than a tsv file.
In Bostock's code the data is read in from a tsv file, the code is below.
d3.tsv("data.tsv", type, function(error, data) {
x.domain(data.map(function(d) { return d.letter; }));
y.domain([0, d3.max(data, function(d) { return d.frequency; })]);
Additionally, I am receiving updates from a server and the data on certain bars will be updating while other bars are constant. Rather than refreshing the page I want to update the bars which change. For this type of project should I try to use something like react, or any other recommendations. Help here would be greatly appreciated. Thanks!!