How to add events to the individual sections(arcs) of a pie chart created out of d3.js?
This is a basic code to create a pie chart for protocol distribution. In my .csv file, I have two columns viz., protocol name and the percentage.I want to add events on individual arcs. For example, when i click only on the arc containing TCP stats, it should lead to another page. Please help how can i do this. I was able to add click event for the pie chart as whole. <!DOCTYPE html> <meta charset="utf-8"> <style> body { font: 10px sans-serif; } .arc path { stroke: #fff; } </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var width = 960, height = 500, radius = Math