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
pull/1/head
olau@iola.dk 17 years ago
parent 9396ceb4bc
commit 6277b34c86

@ -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) {

Loading…
Cancel
Save