score:9
Accepted answer
i would create two separate g
elements for the layers in the beginning. this way you can control their order:
var countourg = svg.append("g"),
streetg = svg.append("g");
d3.json("streets.json", function(error, topology) {
streetg.selectall("path")...
});
d3.json("contour.json", function(error, topology) {
contourg.selectall("path")...
});
Source: stackoverflow.com
Related Query
- How to control the order of the layers on a map in d3js
- How can I put the Germany map on a svg in HTML? D3js
- How to control the number of tick values in a graph with d3js
- D3js how to append 2 children at the same level in .enter context
- how to control the simulation speed of d3 force layout
- How do I control the bounce entry of a Force Directed Graph in D3?
- How to control the group node distance in Hierarchical Edge Bundling in D3.js
- D3.js: How to combine 2 datasets in order to create a map and show values on.mouseover?
- in Dimple how do you change the order of the series ina legend?
- How to center & scale map in d3js (use projection.center/translate/rotate?)
- Draw a map with D3.js: How to get the right scale() and translate()?
- d3js : how to put circles at the end of an arc
- How do I get the d3 svg points to stay in their correct position on the leaflet map when zooming?
- d3js - how to rotate a map using d3js
- How to bind data to the corresponding D3.js map elements?
- How to keep the order of slices fixed in a pie chart? [d3]
- How to change the layout of the d3js chart?
- D3js : How to get the real bounding box of features crossing the anti-meridian?
- How to dynamically change the color of a country on d3 map
- How to control the thickness of lines in the Hierarchical Edge Bundling chart?
- how to vertical the tree in d3js
- d3js How do I pass arguments to the Force Tick event?
- How to check if the mouse is inside actual map bounds in d3 geo?
- How can I display tooltips from multiple maps when mousover on one of the maps in D3js
- How can I change the sort order of a D3 ordinal scale?
- How do I graph an individual line for each the groups within a Javascript map object using D3.js
- d3js - How to use the `this` keyword or what is the alternate?
- D3js How to format the content of some columns in a table
- How to change labels on the control button in NVD3?
- How can I apply a custom (defined) order to the rows of a row chart in DC.js?
More Query from same tag
- R shiny AngularJS working
- d3 tree tooltip does not appear
- d3 mouse over event doesn't fire correctly if set from function(d)
- csv data logs but json data doesn't?
- D3 spaces between groups
- Cannot find name 'line' - d3 line chart
- d3 svg to fill screen
- How to init d3 svg element from embeded extern svg-file and manipulate it
- D3 trying to access vis element in json object
- D3 Zoom & Pan - How to enable zooming & panning anywhere on the chart and restrict showing circle within the range while panning & zooming
- How can I add labels inside the points in a scatterplot?
- attr() won't change an attribute unless I return it via an anonymous function
- add space/gap in a line in D3
- How can I open and parse a local csv file into an array?
- add JavaScript to w2ui panel
- D3 V4 Draggable network with Force Directed Layout
- d3 Sunburst reduce parent node inner and outer radius on click
- How to manipulate specific SVG Paths in D3.js
- Find next highest and next lowest number in a sequence
- D3.js fixed position group in chord diagram
- D3.js nest function, cannot get data into hierarchy
- D3: How to select every thing under svg element
- How to access svg defined in another function?
- Get attribute values for just selected bar in chart
- Does d3.js support customised html for rendering nodes?
- Apply class to specific data in CSV file
- How to add Label to each state in d3.js (albersUsa)?
- Salesforce Not loading D3 V3 Script
- Drawing Multiple Lines in D3.js
- D3js - Binding Data to Multiple Donut Charts