Open ghost opened 8 years ago
Yeah this is a common problem with dc.js and friends - it looks like a declarative syntax but often each method is modifying something imperatively. So the order matters when you think it wouldn't. Ideally there would be an internal model which gets realized on render / redraw all at once.
Thanks for reporting this!
If a featureOptions are defined via anonymous function for a choropleth map before defining colors and colorAccessor, you get unexpected behaviour. eg:
This is due to the color domain being redefined by the dc color mixin. The above code attempts to set the stroke of each polygon equal to the same color as the polygon fill. However, because The colorAccessor is trying to redefine the domain (which is already defined), the stroke colors end up being off.
To fix this, you can define the featureOptions function after colors, and everything works as expected.