Commit e3540717 authored by David Schnur's avatar David Schnur

Minor cleanup of text-style color defaults.

parent a2dd0645
...@@ -34,16 +34,20 @@ Licensed under the MIT license. ...@@ -34,16 +34,20 @@ Licensed under the MIT license.
// the actual Flot code // the actual Flot code
(function($) { (function($) {
// Cache the prototype hasOwnProperty for faster access
var hasOwnProperty = Object.prototype.hasOwnProperty;
// Add default styles for tick labels and other text // Add default styles for tick labels and other text
var STYLES = [
".flot-tick-label {font-size:smaller;color:#545454;}"
];
$(function() { $(function() {
$("head").prepend("<style id='flot-default-styles'>.flot-tick-label {font-size:smaller;color:#545454;}</style>"); $("head").prepend("<style id='flot-default-styles'>" + STYLES.join("") + "</style>");
}); });
// Cache the prototype hasOwnProperty for faster access
var hasOwnProperty = Object.prototype.hasOwnProperty;
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// The Canvas object is a wrapper around an HTML5 <canvas> tag. // The Canvas object is a wrapper around an HTML5 <canvas> tag.
// //
...@@ -668,6 +672,9 @@ Licensed under the MIT license. ...@@ -668,6 +672,9 @@ Licensed under the MIT license.
options.xaxes[i] = axisOptions; options.xaxes[i] = axisOptions;
if (axisOptions.font) { if (axisOptions.font) {
axisOptions.font = $.extend({}, fontDefaults, 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. ...@@ -677,6 +684,9 @@ Licensed under the MIT license.
options.yaxes[i] = axisOptions; options.yaxes[i] = axisOptions;
if (axisOptions.font) { if (axisOptions.font) {
axisOptions.font = $.extend({}, fontDefaults, axisOptions.font); axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
if (!axisOptions.font.color) {
axisOptions.font.color = axisOptions.color;
}
} }
} }
......
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