D3.js grouped bar chart legend missing data
问题 I have a grouped bar chart with an interactive legend. All seems to display and work ok but the legend is missing a value. I know that the issue is that the legend is going off the index of items on the x0 axis rather than the index of the bars (x1 axis). However i do not know how to resolve this. My data consists of the following: [{ "Group": 1, "DataPoints": [{ "BarValue": "Extension Cable", "Value": 1 }] }, { "Group": 2, "DataPoints": [{ "BarValue": "Extension Cable", "Value": 1 }, {