diff options
Diffstat (limited to 'libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js')
-rw-r--r-- | libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js b/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js index 8688f71aea..227bbc8a8d 100644 --- a/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js +++ b/libs/jqplot/plugins/jqplot.canvasAxisTickRenderer.js @@ -49,10 +49,10 @@ // tick mark on the axis. One of 'inside', 'outside', 'cross', '' or null. this.mark = 'outside'; // prop: showMark - // wether or not to show the mark on the axis. + // whether or not to show the mark on the axis. this.showMark = true; // prop: showGridline - // wether or not to draw the gridline on the grid at this tick. + // whether or not to draw the gridline on the grid at this tick. this.showGridline = true; // prop: isMinorTick // if this is a minor tick. @@ -65,10 +65,10 @@ // will be stoked above and below axis, so total length will be twice this. this.markSize = 4; // prop: show - // wether or not to show the tick (mark and label). + // whether or not to show the tick (mark and label). this.show = true; // prop: showLabel - // wether or not to show the label. + // whether or not to show the label. this.showLabel = true; // prop: labelPosition // 'auto', 'start', 'middle' or 'end'. @@ -180,6 +180,16 @@ return w; } }; + + // return top. + $.jqplot.CanvasAxisTickRenderer.prototype.getTop = function(ctx) { + if (this._elem) { + return this._elem.position().top; + } + else { + return null; + } + }; $.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad = function() { var a = this.angle * Math.PI/180; @@ -225,13 +235,13 @@ elem.style.height = h; elem.style.textAlign = 'left'; elem.style.position = 'absolute'; - - elem = plot.canvasManager.initCanvas(elem); - + + elem = plot.canvasManager.initCanvas(elem); + this._elem = $(elem); this._elem.css(this._styles); this._elem.addClass('jqplot-'+this.axis+'-tick'); - + elem = null; return this._elem; }; |