diff --git a/jquery.flot.js b/jquery.flot.js index 9f6a909..14025b5 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -34,16 +34,20 @@ Licensed under the MIT license. // the actual Flot code (function($) { + // Cache the prototype hasOwnProperty for faster access + + var hasOwnProperty = Object.prototype.hasOwnProperty; + // Add default styles for tick labels and other text + var STYLES = [ + ".flot-tick-label {font-size:smaller;color:#545454;}" + ]; + $(function() { - $("head").prepend(""); + $("head").prepend(""); }); - // Cache the prototype hasOwnProperty for faster access - - var hasOwnProperty = Object.prototype.hasOwnProperty; - /////////////////////////////////////////////////////////////////////////// // The Canvas object is a wrapper around an HTML5 tag. // @@ -668,6 +672,9 @@ Licensed under the MIT license. options.xaxes[i] = axisOptions; if (axisOptions.font) { axisOptions.font = $.extend({}, fontDefaults, axisOptions.font); + if (!axisOptions.font.color) { + axisOptions.font.color = axisOptions.color; + } } } @@ -677,6 +684,9 @@ Licensed under the MIT license. options.yaxes[i] = axisOptions; if (axisOptions.font) { axisOptions.font = $.extend({}, fontDefaults, axisOptions.font); + if (!axisOptions.font.color) { + axisOptions.font.color = axisOptions.color; + } } }