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

calculate xAxisOffset based on given height / default #26

Open
cheapsteak opened this issue Jan 5, 2017 · 3 comments
Open

calculate xAxisOffset based on given height / default #26

cheapsteak opened this issue Jan 5, 2017 · 3 comments

Comments

@cheapsteak
Copy link
Collaborator

cheapsteak commented Jan 5, 2017

image

Doesn't seem to fully use the space passed in, resulting in excess whitespace beneath the chart


The top of the chart is also sometimes a bit crowded when height is ~300

image

@cheapsteak cheapsteak changed the title Excess whitespace beneath chart Excess whitespace beneath chart, chart top a bit crowded Jan 5, 2017
@alex-wilmer
Copy link
Collaborator

alex-wilmer commented Jan 5, 2017

I expose an option xAxisOffset which is the number of pixels from the bottom of the svg to where the xAxis should start. Playing with height (the total height of the svg) and xAxisOffset gives some room here.. though maybe I should alias xAxisOffset to plotHeight vs totalHeight to make it more sensible for the developer. thoughts?

@cheapsteak
Copy link
Collaborator Author

Since the height is provided, can the graph automatically compute the layout required to fill the space it's given? Spacing/offset seems like something that would be better handled outside the library

Similar to how when laying out an image would usually not involve expanding the image to add whitespace, but rather through css margins

@alex-wilmer
Copy link
Collaborator

oh right, yea that should definitely be the default behaviour

@alex-wilmer alex-wilmer changed the title Excess whitespace beneath chart, chart top a bit crowded calculate xAxisOffset based on given height / default Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants