I am slightly confused I need to load multiple CSV files using javascript and i need to change some properties of each of the dataset loaded. So basically I am using this framework called d3 and I want to load 3 csv files and then for each of the csv file i need to change the colour of the lines plotted for a parallel coordinates plot. Currently I'm using three data loads but this messes up my plot and i have values all over.
// load csv file and create the chart
d3.csv('X.csv', function(data) {
pc = d3.parallelCoordinates()("parallelcoordinates")
.data(data)
.color(color)
.alpha(0.4)
.render()
.brushable() // enable brushing
.interactive() // command line mode
var explore_count = 0;
var exploring = {};
var explore_start = false;
pc.svg
.selectAll(".dimension")
.style("cursor", "pointer")
.on("click", function(d) {
exploring[d] = d in exploring ? false : true;
event.preventDefault();
if (exploring[d]) d3.timer(explore(d,explore_count,pc));
});
I am doing the above three times. Now what happens is that all the data is plotted on the same graph but then the values overlap (Basically its three graphs on top of each other). I want to integrate it all and I think the best way to do it is to load the JS file smartly and manipulate it somehow. I don't know how though. Would someone tell me how i would be able to achieve this?