Commit 6277b34c authored by olau@iola.dk's avatar olau@iola.dk

Make heuristic for x axis label widths more dynamic (based on patch by rickinhethuis)


git-svn-id: https://flot.googlecode.com/svn/trunk@210 1e0a6537-2640-0410-bfb7-f154510ff394
parent 9396ceb4
......@@ -157,6 +157,8 @@ Bug fixes:
- Fix for uneven axis margins (report and patch by Paul Kienzle) and
snapping to ticks (concurrent report and patch by lifthrasiir).
- Fixed bug with slicing in findNearbyItems (patch by zollman).
- Make heuristic for x axis label widths more dynamic (patch by
rickinhethuis).
Flot 0.5
--------
......
......@@ -620,7 +620,7 @@
// them, we don't need the exact figures and the
// fixed-size box content is easy to center
if (axis.labelWidth == null)
axis.labelWidth = canvasWidth / 6;
axis.labelWidth = canvasWidth / (axis.ticks.length > 0 ? axis.ticks.length : 1);
// measure x label heights
if (axis.labelHeight == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment