Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Fonts Being Applied to Axis Container #36

Closed
LeeGDavis opened this issue Apr 6, 2017 · 4 comments
Closed

Default Fonts Being Applied to Axis Container #36

LeeGDavis opened this issue Apr 6, 2017 · 4 comments

Comments

@LeeGDavis
Copy link

D3: 4.7.4
Chrome: 57.0.2987.133 (64-bit)
OS: Win 10x64, Ubuntu 16.10

We are transitioning to D3 v4 and have noticed that the axis containers are receiving a default font and size, font-size="10" font-family="sans-serif", which is clobbering our desired inherited styles.

Is this expected behaviour?

@LeeGDavis
Copy link
Author

Actually looking at the D3 Changes is this representative of the default styles and shorter syntax? I basically want to understand if this is normative?

@mbostock
Copy link
Member

mbostock commented Apr 6, 2017

@mbostock mbostock closed this as completed Apr 6, 2017
@mbostock
Copy link
Member

mbostock commented Apr 6, 2017

If you don’t want these styles, you can either remove the attributes after rendering the axis (see the axis styling example), or you may be able to modify your stylesheet so that your styles take precedence over the attributes.

Please use Stack Overflow tag d3.js to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly. Stack Overflow provides a better collaborative forum for self-help: tens of thousands of D3-related questions have already been asked there, and some answered questions may be relevant to you.

When asking for help, please include a link to a live example that demonstrates the issue, preferably on bl.ocks.org. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.

If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.

Thank you! 🤗

@LeeGDavis
Copy link
Author

Much appreciated, thanks @mbostock ! I'll certainly move questions over to those other venues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants