1

I'm looking to make the following work:

.attr("fill", function (d, i, j) {
     return color(j)

Using j as the parent element's index worked fine in V3, but that was dropped in V4 according to d3.js v4: How to access parent group's datum index?.

I have a radial/radar/... chart, and the points on the axes are supposed to be colored in the same color as the areas are.

Here, it's fixed using "id", but I cant quite get that to work just yet - and was wondering if there is not a prettier way of working it anyway? http://bl.ocks.org/mthh/7e17b680b35b83b49f1c22a3613bd89f

Cheers!

Flo
  • 97
  • 10

0 Answers0