Commit cc1d6bf3 authored by David Schnur's avatar David Schnur

Minor cleanup in axisOptions check.

parent 80851c0d
......@@ -867,12 +867,14 @@ Licensed under the MIT license.
// Compatibility with markrcote/flot-axislabels
if (axisOptions && !axisOptions.label && axisOptions.axisLabel) {
if (axisOptions) {
if (!axisOptions.label && axisOptions.axisLabel) {
axisOptions.label = axisOptions.axisLabel;
}
if (axisOptions && !axisOptions.labelPadding && axisOptions.axisLabelPadding) {
if (!axisOptions.labelPadding && axisOptions.axisLabelPadding) {
axisOptions.labelPadding = axisOptions.axisLabelPadding;
}
}
axisOptions = $.extend(true, {}, options.xaxis, axisOptions);
options.xaxes[i] = axisOptions;
......@@ -899,12 +901,14 @@ Licensed under the MIT license.
// Compatibility with markrcote/flot-axislabels
if (axisOptions && !axisOptions.label && axisOptions.axisLabel) {
if (axisOptions) {
if (!axisOptions.label && axisOptions.axisLabel) {
axisOptions.label = axisOptions.axisLabel;
}
if (axisOptions && !axisOptions.labelPadding && axisOptions.axisLabelPadding) {
if (!axisOptions.labelPadding && axisOptions.axisLabelPadding) {
axisOptions.labelPadding = axisOptions.axisLabelPadding;
}
}
axisOptions = $.extend(true, {}, options.yaxis, axisOptions);
options.yaxes[i] = axisOptions;
......
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