Open n1ywb opened 7 years ago
In some areas, e.g. https://github.com/novus/nvd3/blob/master/src/models/discreteBar.js#L179 NVD3 unconditionally overrides the class of an existing element.
This is bad because sometimes you might want to set your own classes on those elements, e.g. if you're trying to use NVD3 with Polymer scoped styles https://www.polymer-project.org/1.0/docs/devguide/styling#scope-subtree
D3 offers a classed method for this exact use-case https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#classed
classed
see also https://github.com/saeidzebardast/nvd3-elements/issues/17
Please send us a pull request with changes to classed and I'll merge it in.
In some areas, e.g. https://github.com/novus/nvd3/blob/master/src/models/discreteBar.js#L179 NVD3 unconditionally overrides the class of an existing element.
This is bad because sometimes you might want to set your own classes on those elements, e.g. if you're trying to use NVD3 with Polymer scoped styles https://www.polymer-project.org/1.0/docs/devguide/styling#scope-subtree
D3 offers a
classed
method for this exact use-case https://github.com/d3/d3-3.x-api-reference/blob/master/Selections.md#classedsee also https://github.com/saeidzebardast/nvd3-elements/issues/17