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

Different size of chart with X-Axis vs. size of chart without X-Axis #1048

Closed
ghost opened this issue May 15, 2013 · 2 comments · Fixed by #1200
Closed

Different size of chart with X-Axis vs. size of chart without X-Axis #1048

ghost opened this issue May 15, 2013 · 2 comments · Fixed by #1200
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented May 15, 2013

Between flot-library 0.7 and 0.8 the sizing-behaviour of a flot-chart changed.
With flot 0.7 the chart had a width of 100% of it's container (with x-axis and also without x-axis). As a result it could have happened, that the tick-labels of the x-axis were cut (but that was OK for me). With the new version, the chart does not have a width of 100% when showing the x-axis and tick-labels, but when the x-axis is hidden. I think this is for ensuring, that the tick-labels will always be shown completely!?
Could this behaviour be "user-changed" by a parameter? A good option for me would be, that I could say "only draw tick-labels which do not cross the border". Anything like this...
Please find also a discussion here: https://groups.google.com/forum/?fromgroups=#!topic/flot-graphs/FTI7A8IpHMw

1
2

@ghost ghost assigned dnschnur Nov 25, 2013
dnschnur added a commit to dnschnur/flot that referenced this issue Nov 26, 2013
Flot 0.8 added logic to account for the size of axis tick labels and add
padding around the edges of the plot, to prevent long labels from
sticking out.  But it padded both sides equally, which is incorrect if
the right/top side has no last axis label.

Fixed by allocating padding per-side, and checking whether the last
label would be shown before padding the top or right.  Fixes flot#1048.
@andig
Copy link

andig commented Mar 26, 2014

Continued from #1212

I believe the issue is not fixed by #1200, see this fiddle: http://jsfiddle.net/andig2/R4V7E/3/

@dnschnur
Copy link
Member

I had to roll back the change that resolved this issue, since it broke wrapping behavior for ticks near the right edge of a plot. I've pushed a work-around, described in #1212, that provides the same effect; it just requires that you set reserveSpace to false on the axis.

We'll implement a proper solution for all of this in 0.9.

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

Successfully merging a pull request may close this issue.

2 participants