Commit 55e671b7 authored by David Schnur's avatar David Schnur

Fix incorrect default for xaxes/yaxes tickColor.

The way in which xaxes/yaxes inherit options from xaxis/yaxis resulted
in a minor bug, where tickColor defaulted to the xaxis/yaxis color
instead of the color for its axis.  Fixed by applying the default before
extending the per-axis options, resolving #984.

There's still some questionable behavior here; this section should be
revisited for 0.9, especially with an eye towards removing some of the
code that only exists for backwards-compatibility.
parent 4e8d8535
......@@ -674,8 +674,15 @@ Licensed under the MIT license.
axisCount = options.xaxes.length || 1;
for (i = 0; i < axisCount; ++i) {
axisOptions = $.extend(true, {}, options.xaxis, options.xaxes[i]);
axisOptions = options.xaxes[i];
if (axisOptions && !axisOptions.tickColor) {
axisOptions.tickColor = axisOptions.color;
}
axisOptions = $.extend(true, {}, options.xaxis, axisOptions);
options.xaxes[i] = axisOptions;
if (axisOptions.font) {
axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
if (!axisOptions.font.color) {
......@@ -686,8 +693,15 @@ Licensed under the MIT license.
axisCount = options.yaxes.length || 1;
for (i = 0; i < axisCount; ++i) {
axisOptions = $.extend(true, {}, options.yaxis, options.yaxes[i]);
axisOptions = options.yaxes[i];
if (axisOptions && !axisOptions.tickColor) {
axisOptions.tickColor = axisOptions.color;
}
axisOptions = $.extend(true, {}, options.yaxis, axisOptions);
options.yaxes[i] = axisOptions;
if (axisOptions.font) {
axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);
if (!axisOptions.font.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