From 4e8d8535e0d20c224869e457bd22c78ba7d1d585 Mon Sep 17 00:00:00 2001 From: David Schnur Date: Sun, 31 Mar 2013 13:43:24 -0400 Subject: [PATCH] Move time-specific options into the time plugin. --- jquery.flot.js | 8 +------- jquery.flot.time.js | 9 ++++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/jquery.flot.js b/jquery.flot.js index 2f11d43..3719004 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -453,7 +453,6 @@ Licensed under the MIT license. show: null, // null = auto-detect, true = always, false = never position: "bottom", // or "top" mode: null, // null or "time" - timezone: null, // "browser" for local to the client or timezone for timezone-js font: null, // null (derived from CSS in placeholder) or object like { size: 11, style: "italic", weight: "bold", family: "sans-serif", variant: "small-caps" } color: null, // base color, labels, ticks tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)" @@ -469,14 +468,9 @@ Licensed under the MIT license. reserveSpace: null, // whether to reserve space even if axis isn't shown tickLength: null, // size in pixels of ticks, or "full" for whole line alignTicksWithAxis: null, // axis number or null for no sync - - // mode specific options tickDecimals: null, // no. of decimals, null means auto tickSize: null, // number or [number, "unit"] - minTickSize: null, // number or [number, "unit"] - monthNames: null, // list of names of months - timeformat: null, // format string to use - twelveHourClock: false // 12 or 24 time in time mode + minTickSize: null // number or [number, "unit"] }, yaxis: { autoscaleMargin: 0.02, diff --git a/jquery.flot.time.js b/jquery.flot.time.js index 252147b..3d3360b 100644 --- a/jquery.flot.time.js +++ b/jquery.flot.time.js @@ -10,7 +10,14 @@ API.txt for details. (function($) { - var options = {}; + var options = { + xaxis: { + timezone: null, // "browser" for local to the client or timezone for timezone-js + timeformat: null, // format string to use + twelveHourClock: false, // 12 or 24 time in time mode + monthNames: null // list of names of months + } + }; // round to nearby lower multiple of base