Link legend to d3.chart.legend