diff options
-rw-r--r-- | js/RrdGraph.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/RrdGraph.js b/js/RrdGraph.js index cba141d..642b9c5 100644 --- a/js/RrdGraph.js +++ b/js/RrdGraph.js | |||
@@ -1697,9 +1697,14 @@ RrdGraph.prototype.leg_place = function (calc_width) | |||
1697 | if (this.gdes[i].gf === RrdGraphDesc.GF_VRULE && (this.gdes[i].xrule < this.start || this.gdes[i].xrule > this.end)) | 1697 | if (this.gdes[i].gf === RrdGraphDesc.GF_VRULE && (this.gdes[i].xrule < this.start || this.gdes[i].xrule > this.end)) |
1698 | this.gdes[i].legend = null; | 1698 | this.gdes[i].legend = null; |
1699 | } | 1699 | } |
1700 | this.gdes[i].legend = this.gdes[i].legend.replace(/\\t/gi, "\t") /* turn \\t into tab */ | ||
1701 | 1700 | ||
1702 | leg_cc = this.gdes[i].legend.length; | 1701 | if (this.gdes[i].legend != null) { |
1702 | this.gdes[i].legend = this.gdes[i].legend.replace(/\\t/gi, "\t") /* turn \\t into tab */ | ||
1703 | leg_cc = this.gdes[i].legend.length; | ||
1704 | } else { | ||
1705 | leg_cc = 0; | ||
1706 | } | ||
1707 | |||
1703 | /* is there a controle code at the end of the legend string ? */ | 1708 | /* is there a controle code at the end of the legend string ? */ |
1704 | if (leg_cc >= 2 && this.gdes[i].legend.charAt(leg_cc - 2) === '\\') { | 1709 | if (leg_cc >= 2 && this.gdes[i].legend.charAt(leg_cc - 2) === '\\') { |
1705 | prt_fctn = this.gdes[i].legend.charAt(leg_cc - 1); | 1710 | prt_fctn = this.gdes[i].legend.charAt(leg_cc - 1); |