When you use beforeRender to filter data and plot different features in the same chart, the classes applied to the series containers are linked to the index in relation to the filtered data not in the original data.
For instance both the bars and the line are classed series0 in this http://visible.io/charts/column/multi-dimension.html
We've been binding an index to the data and accessing it in the afterRender which is less than ideal
line.afterRender(function() {
this.container.selectAll(".lines g.line")
.each(function(d,i) {
d3.select(this).classed("mixed-series-" + d.index, true);
});
})
When you use
beforeRenderto filter data and plot different features in the same chart, the classes applied to the series containers are linked to the index in relation to the filtered data not in the original data.For instance both the bars and the line are classed
series0in this http://visible.io/charts/column/multi-dimension.htmlWe've been binding an index to the data and accessing it in the
afterRenderwhich is less than ideal