score:3
Accepted answer
Not sure if this answers your question completely but can you combine the three 2D arrays into a single array and then pass that array into your plotting function? E.g. something like this:
var data = [data1,data2,data3];
var graph = svg.append('g').selectAll('graph')
.data(data)
.enter().append('g')
.attr('class','graph');
graph.append('path')
.attr('d',function(dat,i){
// dat in this case will correspond to the data for
// for a single curve.
// This will return the path for
// graphing a single curve.
});
Source: stackoverflow.com
Related Query
- d3 handle data in multiple arrays
- I am trying to use multiple 2 arrays for binding data for svg circles but cannot figure out how
- D3: Zoom with multiple line charts somehow combines their data arrays
- Append multiple data arrays to data points
- Display specific data in a td with multiple Arrays using Angular
- Large or unknown number of data arrays with Multiple XY Line Chart in c3.js
- Appending multiple non-nested elements for each data member with D3.js
- Importing data from multiple csv files in D3
- How to handle layers with missing data points in d3.layout.stack()
- D3: update data with multiple elements in a group
- D3.js Plotting Multiple Data Sets from Separate Files
- dc.js add class to data points in multiple charts based on criteria from first chart
- select data based on multiple attributes d3
- How do I process data that is nested multiple levels in D3?
- D3 - How to bind the same data to multiple object?
- d3: Coloring Multiple Lines from Nested Data
- Multi-series chart - time (year) interval x-axis overlaying multiple years of data
- In D3, how can I create multiple elements for each data element based on value in data?
- Merging arrays that hold CSV data into one object array
- D3 - Rendering Multiple Years' Worth of State Data on US Map
- Get mean of all elements at a given index across multiple arrays
- D3: Loading multiple csv data files in a folder
- Data structure for a family tree with multiple partners and siblings?
- How to update multiple elements for each data
- Rickshaw : data for multiple series not working
- D3 with AngularJs, Multiple charts on same page with different data based on common key
- Adding Multiple Rect per data element in d3
- dc.js charting nested data arrays
- How to convert multiple d3.csv data into number?
- Using .filter() in d3.js to return data from corresponding x-axis point on multiple charts
More Query from same tag
- Update multi-line graph D3.js
- How do I get my D3 map to zoom to a location?
- patternTransform in svg not working for entire pattern
- D3.js Transitions
- How to chain d3 transitions?
- Modify HTML contents for updating nodes in D3js?
- D3.JS: multi-line chart with mouseover tooltip
- An error with opening Multi-Series Line Chart from Mike Bosktok
- What is the standard way to get the active (running) D3 v3 Transition for a given element?
- How to expand D3js tree chart onclick a button
- D3js line chart error "attribute d: Expected number, "M49,NaNZ"."
- Append foreignObject containing some HTML inside an SVG element
- Sorting Bar chart in C3js
- D3.js bar chart, bars extending from top to bottom, instead of bottom to top
- D3.js: Rotate text on-spot
- Uncaught TypeError: d3.arc(...).outerRadius(...).innerRadius(...).text is not a function
- Replace data with new set
- Font style of text in svg not propagating to png on download
- tree.nodeSize() not working in D3 tree graph to inc. the space between nodes
- How to set the exact size of an inline SVG element?
- On mouseover cursor changes to button form
- D3 text not centered on nodes?
- D3 - 2 different bar paddings
- text labels are wrong in grouped bar chart d3js
- d3 not creating enough elements to match my data - why?
- Animating a continuous line horiizontally and vertically
- How to make d3-lasso working on d3 forcedirected network?
- d3.js label bars of bar chart
- Append <br> using d3
- D3 : non continuous line chart with null values inside an object