From e4775aabeeb8096f5e77e62b1f4735b6ad013aea Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Mon, 3 Nov 2008 14:29:35 +0000 Subject: [PATCH] Convert axis min/max to numbers git-svn-id: https://flot.googlecode.com/svn/trunk@105 1e0a6537-2640-0410-bfb7-f154510ff394 --- NEWS.txt | 2 +- jquery.flot.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 54660a5..a635d96 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -14,7 +14,7 @@ Vanderburg), and fixed so that setting lineWidth to 0 also hides the shadow (based on problem reported by Sergio Nunes). Updated mousemove position expression to the latest from jQuery (bug reported by meyuchas). Use borders instead of background in legend (fix printing -issue 25 and 45). +issue 25 and 45). Explicitly convert axis min/max to numbers. Flot 0.5 diff --git a/jquery.flot.js b/jquery.flot.js index d1cc301..6aacefb 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -383,8 +383,8 @@ } function setRange(axis, axisOptions) { - var min = axisOptions.min != null ? axisOptions.min : axis.datamin; - var max = axisOptions.max != null ? axisOptions.max : axis.datamax; + var min = axisOptions.min != null ? +axisOptions.min : axis.datamin; + var max = axisOptions.max != null ? +axisOptions.max : axis.datamax; if (max - min == 0.0) { // degenerate case