score:1
Accepted answer
This will give you the full data associated with the node on click.
onclick: function(d) {
console.log(jsonfile[d.index]);//will console. the clicked node's data.
}
Working code here
Source: stackoverflow.com
Related Query
- Get all the data from a clicked node in C3JS
- In d3, how to get the interpolated line data from a SVG line?
- How to get the data from the c3.js
- d3.js on-demand data loading to get the next node for a tree
- How can I get the dom svg element from d3 node data?
- Unable to get the correct index of node that was clicked in d3 and update the JSON at that location
- access data of child node when clicked on the link in d3 tree layout
- Get the data from a GET request before rendering D3.js graph
- In d3 4.0, how can I get extra data from the stratified object?
- How to get the data of a D3 node in Chrome Extension content script
- How to get the data from given array of objects in d3.js
- How to get a D3.js pie chart to render data dynamically from the DOM
- How do I remove all children elements from a node and then apply them again with different color and size?
- How to get data of parent node in d3.js
- D3.js: Get an array of the data attached to a selection?
- clicking a node in d3 from a button outside the svg
- MultiBar chart with nvd3 / d3 only shows labels for every other tick on the x-axis. How can I get them all to show up?
- D3.JS get reference to bound data of clicked object
- Can d3.js draw two scatterplots on the same graph using data from the same source?
- Get data from rest service using D3
- Updating the data of a pack layout from JSON call and redrawing
- Get all dom nodes from d3 selection
- How to update elements of an HTML that the elements are created using data from a CSV file?
- How to get the same node positions in d3's force layout graph
- How to assign the x-axis position of a node in a Sankey Diagram (D3) from the json file
- dc.js - how to get the average of a column in data set
- Does the d3 treemap layout get cached when a root node is passed to it?
- Display only values from the data set into X axis ticks
- Javascript: Array of dictionaries, get all key value pairs from one dictionairy with condition
- Create data visualizations using Express and get data from a PostgreSQL database
More Query from same tag
- nvd3 chart error when display:none
- How to change the scale of axes in line chart using d3.js?
- Iterate over X3DOM nodes in d3.js
- How to update all existing elements in the same level with same parent value?
- In d3 on blur event is not working in firefox only
- Plotting points in D3.js
- d3JS: Transitions between valuelines of different points counts
- d3 Uncaught TypeError: n.domain is not a function
- C3.js horizontal bar chart - Highlight a specific x-axis tick together with bar
- add nodes dynamically to leaf node in D3.js using Tree layout v4 (version 4)
- How to update d3 graphics if I load from external data?
- D3.js text enter (within svg) transition opacity 0 to 1 won't end at 1
- How to change line color in d3js according to axis value?
- D3.js - How to create transitions with drop down control for donut chart?
- Textarea do not show in nested svg
- Insert element as sibling using D3js
- Interacting forces with D3.js
- d3 javascript click function call
- D3.js append tspan to text element
- d3 tick marks on integers only
- Get arrowheads to point at outer edge of node in D3
- d3 loop through local data variable to make stacked bar chart
- MongoDB Collection as data source for cs.js in Meteor app
- scaleQuantize, color bars based on height
- D3 Behavior Zoom Manual Adjustment
- How to use different orientation for axis label in a parallel coordinate chart
- d3.js get new domain values after rescale
- Hover on <p> element to highlight geographic boundary, D3 Choropleth
- In D3 Sankey, how can I load the from objects or arrays instead of either json or csv files?
- How to turn a raw DOM element in to a D3 selection?