jqplot-on-rails 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +31 -0
  6. data/Rakefile +2 -0
  7. data/jqplot-on-rails.gemspec +20 -0
  8. data/lib/jqplot-on-rails/version.rb +5 -0
  9. data/lib/jqplot-on-rails.rb +8 -0
  10. data/vendor/assets/javascripts/jqplot/excanvas.js +1438 -0
  11. data/vendor/assets/javascripts/jqplot/jquery.jqplot.js +11411 -0
  12. data/vendor/assets/javascripts/jqplot/plugins/jqplot.BezierCurveRenderer.js +314 -0
  13. data/vendor/assets/javascripts/jqplot/plugins/jqplot.BezierCurveRenderer.min.js +3 -0
  14. data/vendor/assets/javascripts/jqplot/plugins/jqplot.barRenderer.js +801 -0
  15. data/vendor/assets/javascripts/jqplot/plugins/jqplot.barRenderer.min.js +3 -0
  16. data/vendor/assets/javascripts/jqplot/plugins/jqplot.blockRenderer.js +235 -0
  17. data/vendor/assets/javascripts/jqplot/plugins/jqplot.blockRenderer.min.js +3 -0
  18. data/vendor/assets/javascripts/jqplot/plugins/jqplot.bubbleRenderer.js +759 -0
  19. data/vendor/assets/javascripts/jqplot/plugins/jqplot.bubbleRenderer.min.js +3 -0
  20. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js +203 -0
  21. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js +3 -0
  22. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisTickRenderer.js +253 -0
  23. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js +3 -0
  24. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasOverlay.js +1021 -0
  25. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasOverlay.min.js +3 -0
  26. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasTextRenderer.js +449 -0
  27. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasTextRenderer.min.js +3 -0
  28. data/vendor/assets/javascripts/jqplot/plugins/jqplot.categoryAxisRenderer.js +679 -0
  29. data/vendor/assets/javascripts/jqplot/plugins/jqplot.categoryAxisRenderer.min.js +3 -0
  30. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ciParser.js +116 -0
  31. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ciParser.min.js +3 -0
  32. data/vendor/assets/javascripts/jqplot/plugins/jqplot.cursor.js +1108 -0
  33. data/vendor/assets/javascripts/jqplot/plugins/jqplot.cursor.min.js +3 -0
  34. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dateAxisRenderer.js +741 -0
  35. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dateAxisRenderer.min.js +3 -0
  36. data/vendor/assets/javascripts/jqplot/plugins/jqplot.donutRenderer.js +805 -0
  37. data/vendor/assets/javascripts/jqplot/plugins/jqplot.donutRenderer.min.js +3 -0
  38. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dragable.js +225 -0
  39. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dragable.min.js +3 -0
  40. data/vendor/assets/javascripts/jqplot/plugins/jqplot.enhancedLegendRenderer.js +305 -0
  41. data/vendor/assets/javascripts/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js +3 -0
  42. data/vendor/assets/javascripts/jqplot/plugins/jqplot.funnelRenderer.js +943 -0
  43. data/vendor/assets/javascripts/jqplot/plugins/jqplot.funnelRenderer.min.js +3 -0
  44. data/vendor/assets/javascripts/jqplot/plugins/jqplot.highlighter.js +465 -0
  45. data/vendor/assets/javascripts/jqplot/plugins/jqplot.highlighter.min.js +3 -0
  46. data/vendor/assets/javascripts/jqplot/plugins/jqplot.json2.js +475 -0
  47. data/vendor/assets/javascripts/jqplot/plugins/jqplot.json2.min.js +3 -0
  48. data/vendor/assets/javascripts/jqplot/plugins/jqplot.logAxisRenderer.js +534 -0
  49. data/vendor/assets/javascripts/jqplot/plugins/jqplot.logAxisRenderer.min.js +3 -0
  50. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoAxisRenderer.js +611 -0
  51. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js +3 -0
  52. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoRenderer.js +437 -0
  53. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoRenderer.min.js +3 -0
  54. data/vendor/assets/javascripts/jqplot/plugins/jqplot.meterGaugeRenderer.js +1029 -0
  55. data/vendor/assets/javascripts/jqplot/plugins/jqplot.meterGaugeRenderer.min.js +3 -0
  56. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mobile.js +45 -0
  57. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mobile.min.js +3 -0
  58. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ohlcRenderer.js +373 -0
  59. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ohlcRenderer.min.js +3 -0
  60. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pieRenderer.js +904 -0
  61. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pieRenderer.min.js +3 -0
  62. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pointLabels.js +377 -0
  63. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pointLabels.min.js +3 -0
  64. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidAxisRenderer.js +728 -0
  65. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js +3 -0
  66. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidGridRenderer.js +429 -0
  67. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidGridRenderer.min.js +3 -0
  68. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidRenderer.js +514 -0
  69. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidRenderer.min.js +3 -0
  70. data/vendor/assets/javascripts/jqplot/plugins/jqplot.trendline.js +223 -0
  71. data/vendor/assets/javascripts/jqplot/plugins/jqplot.trendline.min.js +3 -0
  72. data/vendor/assets/stylesheets/jquery.jqplot.css +259 -0
  73. metadata +128 -0
@@ -0,0 +1,3 @@
1
+ /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
2
+ jsDate | (c) 2010-2013 Chris Leonello
3
+ */(function(e){e.jqplot.PyramidAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PyramidAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PyramidAxisRenderer.prototype.constructor=e.jqplot.PyramidAxisRenderer;e.jqplot.PyramidAxisRenderer.prototype.init=function(f){this.position=null;this.drawBaseline=true;this.baselineWidth=null;this.baselineColor=null;this.tickSpacingFactor=25;this._type="pyramid";this._splitAxis=false;this._splitLength=null;this.category=false;this._autoFormatString="";this._overrideFormatString=false;e.extend(true,this,f);this.renderer.options=f;this.resetDataBounds=this.renderer.resetDataBounds;this.resetDataBounds()};e.jqplot.PyramidAxisRenderer.prototype.resetDataBounds=function(){var h=this._dataBounds;h.min=null;h.max=null;var g;for(var m=0;m<this._series.length;m++){var n=this._series[m];var o=n._plotData;for(var k=0,f=o.length;k<f;k++){if(this.name.charAt(0)==="x"){g=o[k][1];if((g!==null&&g<h.min)||h.min===null){h.min=g}if((g!==null&&g>h.max)||h.max===null){h.max=g}}else{g=o[k][0];if((g!==null&&g<h.min)||h.min===null){h.min=g}if((g!==null&&g>h.max)||h.max===null){h.max=g}}}}};e.jqplot.PyramidAxisRenderer.prototype.draw=function(f,n){if(this.show){this.renderer.createTicks.call(this,n);var m=0;var g;if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=e(document.createElement("div"));this._elem.addClass("jqplot-axis jqplot-"+this.name);this._elem.css("position","absolute");if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var l=this._label.draw(f,n);l.appendTo(this._elem);l=null}var k=this._ticks;var j;for(var h=0;h<k.length;h++){j=k[h];if(j.show&&j.showLabel&&(!j.isMinorTick)){this._elem.append(j.draw(f,n))}}j=null;k=null}return this._elem};var b=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];var d={};for(var c=0,a=b.length;c<a;c++){d[b[c]]=b[c]}e.jqplot.PyramidAxisRenderer.prototype.createTicks=function(D){var J=this.ticks;var M=this._dataBounds;var E;var K;var B;var G;var y;var n;var k;var h;var H;var C;var x;var L=this.min;var N=this.max;var q;var v;var m;var g;var j;var O;var A;var F;var r;var P;var z=null;var I;if(J.length){for(H=0,C=J.length;H<C;H++){q=J[H];v=new this.tickRenderer(this.tickOptions);if(e.isArray(q)){v.value=q[0];v.label=q[1];v.setTick(q[0],this.name);this._ticks.push(v)}else{if(e.isPlainObject(q)){e.extend(true,v,q);v.axis=this.name;this._ticks.push(v)}else{if(typeof q==="string"){P=H+D.defaultAxisStart}else{P=q}v.value=P;v.label=q;v.axis=this.name;this._ticks.push(v)}}}this.numberTicks=J.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1);if(this._options.tickInterval){var o=this._options.tickInterval;for(H=0;H<this.numberTicks;H++){if(H%o!==0){this._ticks[H].isMinorTick=true}}}else{E=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;r=Math.round(2+E/this.tickSpacingFactor);if(this.numberTicks>r){I=this.numberTicks-1;for(H=2;H<I;H++){if(I%H===0&&I/H<r){z=H-1;break}}if(z!==null){var p=1;for(H=1,C=this._ticks.length;H<C;H++){if(p<=z){this._ticks[H].show=false;p+=1}else{p=1}}}}}I=[];if(this.category){this._ticks[0].showGridline=false;this._ticks[0].showMark=false;for(H=this._ticks.length-1;H>0;H--){v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[H-1].value+this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks[H].showGridline=false;this._ticks[H].showMark=false;this._ticks.splice(H,0,v)}v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[0].value-this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks.unshift(v);v=new this.tickRenderer(this.tickOptions);v.value=this._ticks[this._ticks.length-1].value+this.tickInterval/2;v.label="";v.showLabel=false;v.axis=this.name;this._ticks.push(v);this.tickInterval=this.tickInterval/2;this.numberTicks=this._ticks.length;this.min=this._ticks[0].value;this.max=this._ticks[this._ticks.length-1].value}}else{if(this.name.charAt(0)==="x"){E=this._plotDimensions.width;var w=Math.max(M.max,Math.abs(M.min));var u=Math.min(M.min,-w);B=u;G=w;y=G-B;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}m=30;g=Math.max(E,m+1);j=(g-m)/300;O=e.jqplot.LinearTickGenerator(B,G,j);A=B+y*(this.padMin-1);F=G-y*(this.padMax-1);if(B<A||G>F){A=B-y*(this.padMin-1);F=G+y*(this.padMax-1);O=e.jqplot.LinearTickGenerator(A,F,j)}this.min=O[0];this.max=O[1];this.numberTicks=O[2];this._autoFormatString=O[3];this.tickInterval=O[4]}else{E=this._plotDimensions.height;B=M.min;G=M.max;x=this._series[0];this._ticks=[];y=G-B;if(d[y]){y+=1;G+=1}this.max=G;this.min=B;r=Math.round(2+E/this.tickSpacingFactor);if(y+1<=r){this.numberTicks=y+1;this.tickInterval=1}else{for(var H=r;H>1;H--){if(y/(H-1)===Math.round(y/(H-1))){this.numberTicks=H;this.tickInterval=y/(H-1);break}}}}if(this._overrideFormatString&&this._autoFormatString!=""){this.tickOptions=this.tickOptions||{};this.tickOptions.formatString=this._autoFormatString}var f;for(H=0;H<this.numberTicks;H++){this.tickOptions.axis=this.name;f=this.min+this.tickInterval*H;if(this.name.charAt(0)==="x"){f=Math.abs(f)}this.tickOptions.value=this.min+this.tickInterval*H;v=new this.tickRenderer(this.tickOptions);v.label=v.prefix+v.formatter(v.formatString,f);this._ticks.push(v);if(this.name.charAt(0)==="x"&&D.axes.yMidAxis.show&&this.tickOptions.value===0){this._splitAxis=true;this._splitLength=D.axes.yMidAxis.getWidth();v=new this.tickRenderer(this.tickOptions);this._ticks.push(v);v.value=this.max/2000}}v=null}};e.jqplot.PyramidAxisRenderer.prototype.set=function(){var o=0;var j;var g=0;var n=0;var m;var l;var k;var f=(this._label==null)?false:this._label.show;if(this.show){l=this._ticks;a=l.length;for(m=0;m<a;m++){k=l[m];if(!k._breakTick&&k.show&&k.showLabel&&!k.isMinorTick){if(this.name.charAt(0)==="x"){j=k._elem.outerHeight(true)}else{j=k._elem.outerWidth(true)}if(j>o){o=j}}}if(this.name==="yMidAxis"){for(m=0;m<a;m++){k=l[m];if(k._elem){j=(o-k._elem.outerWidth(true))/2;k._elem.css("left",j)}}}k=null;l=null;if(f){g=this._label._elem.outerWidth(true);n=this._label._elem.outerHeight(true)}if(this.name==="xaxis"){o=o+n;this._elem.css({height:o+"px",left:"0px",bottom:"0px"})}else{if(this.name==="x2axis"){o=o+n;this._elem.css({height:o+"px",left:"0px",top:"0px"})}else{if(this.name==="yaxis"){o=o+g;this._elem.css({width:o+"px",left:"0px",top:"0px"});if(f&&this._label.constructor==e.jqplot.AxisLabelRenderer){this._label._elem.css("width",g+"px")}}else{if(this.name==="yMidAxis"){var j=o/2-g/2;this._elem.css({width:o+"px",top:"0px"});if(f&&this._label.constructor==e.jqplot.AxisLabelRenderer){this._label._elem.css({width:g,left:j,top:0})}}else{o=o+g;this._elem.css({width:o+"px",right:"0px",top:"0px"});if(f&&this._label.constructor==e.jqplot.AxisLabelRenderer){this._label._elem.css("width",g+"px")}}}}}}};e.jqplot.PyramidAxisRenderer.prototype.pack=function(j,g){j=j||{};g=g||this._offsets;var B=this._ticks;var v=this.max;var u=this.min;var o=g.max;var m=g.min;var r=(this._label==null)?false:this._label.show;for(var s in j){this._elem.css(s,j[s])}this._offsets=g;var k=o-m;var l=v-u;var z=this._splitLength;if(this._splitAxis){k-=this._splitLength;this.p2u=function(h){return(h-m)*l/k+u};this.u2p=function(h){if(h<=0){return(h-u)*k/l+m}else{return(h-u)*k/l+m+z}};this.series_u2p=function(h){if(h<=0){return(h-u)*k/l}else{return(h-u)*k/l+z}};this.series_p2u=function(h){return h*l/k+u}}else{this.p2u=function(h){return(h-m)*l/k+u};this.u2p=function(h){return(h-u)*k/l+m};if(this.name.charAt(0)==="x"){this.series_u2p=function(h){return(h-u)*k/l};this.series_p2u=function(h){return h*l/k+u}}else{this.series_u2p=function(h){return(h-v)*k/l};this.series_p2u=function(h){return h*l/k+v}}}if(this.show){if(this.name.charAt(0)==="x"){for(var x=0;x<B.length;x++){var q=B[x];if(q.show&&q.showLabel){var f;if(q.constructor==e.jqplot.CanvasAxisTickRenderer&&q.angle){var A=(this.name=="xaxis")?1:-1;switch(q.labelPosition){case"auto":if(A*q.angle<0){f=-q.getWidth()+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2}else{f=-q._textRenderer.height*Math.sin(q._textRenderer.angle)/2}break;case"end":f=-q.getWidth()+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2;break;case"start":f=-q._textRenderer.height*Math.sin(q._textRenderer.angle)/2;break;case"middle":f=-q.getWidth()/2+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2;break;default:f=-q.getWidth()/2+q._textRenderer.height*Math.sin(-q._textRenderer.angle)/2;break}}else{f=-q.getWidth()/2}var C=this.u2p(q.value)+f+"px";q._elem.css("left",C);q.pack()}}if(r){var n=this._label._elem.outerWidth(true);this._label._elem.css("left",m+k/2-n/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(var x=0;x<B.length;x++){var q=B[x];if(q.show&&q.showLabel&&!q.isMinorTick){var f;if(q.constructor==e.jqplot.CanvasAxisTickRenderer&&q.angle){var A=(this.name=="yaxis")?1:-1;switch(q.labelPosition){case"auto":case"end":if(A*q.angle<0){f=-q._textRenderer.height*Math.cos(-q._textRenderer.angle)/2}else{f=-q.getHeight()+q._textRenderer.height*Math.cos(q._textRenderer.angle)/2}break;case"start":if(q.angle>0){f=-q._textRenderer.height*Math.cos(-q._textRenderer.angle)/2}else{f=-q.getHeight()+q._textRenderer.height*Math.cos(q._textRenderer.angle)/2}break;case"middle":f=-q.getHeight()/2;break;default:f=-q.getHeight()/2;break}}else{f=-q.getHeight()/2}var C=this.u2p(q.value)+f+"px";q._elem.css("top",C);q.pack()}}if(r){var y=this._label._elem.outerHeight(true);if(this.name!=="yMidAxis"){this._label._elem.css("top",o-k/2-y/2+"px")}if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{if(this.name!=="yMidAxis"){this._label._elem.css("right","0px")}}this._label.pack()}}}B=null}})(jQuery);
@@ -0,0 +1,429 @@
1
+ /**
2
+ * jqPlot
3
+ * Pure JavaScript plotting plugin using jQuery
4
+ *
5
+ * Version: 1.0.8
6
+ * Revision: 1250
7
+ *
8
+ * Copyright (c) 2009-2013 Chris Leonello
9
+ * jqPlot is currently available for use in all personal or commercial projects
10
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
11
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
12
+ * choose the license that best suits your project and use it accordingly.
13
+ *
14
+ * Although not required, the author would appreciate an email letting him
15
+ * know of any substantial use of jqPlot. You can reach the author at:
16
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
17
+ *
18
+ * If you are feeling kind and generous, consider supporting the project by
19
+ * making a donation at: http://www.jqplot.com/donate.php .
20
+ *
21
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
22
+ *
23
+ * version 2007.04.27
24
+ * author Ash Searle
25
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
26
+ * http://hexmen.com/js/sprintf.js
27
+ * The author (Ash Searle) has placed this code in the public domain:
28
+ * "This code is unrestricted: you are free to use it however you like."
29
+ *
30
+ */
31
+ (function($) {
32
+ // Class: $.jqplot.CanvasGridRenderer
33
+ // The default jqPlot grid renderer, creating a grid on a canvas element.
34
+ // The renderer has no additional options beyond the <Grid> class.
35
+ $.jqplot.PyramidGridRenderer = function(){
36
+ $.jqplot.CanvasGridRenderer.call(this);
37
+ };
38
+
39
+ $.jqplot.PyramidGridRenderer.prototype = new $.jqplot.CanvasGridRenderer();
40
+ $.jqplot.PyramidGridRenderer.prototype.constructor = $.jqplot.PyramidGridRenderer;
41
+
42
+ // called with context of Grid object
43
+ $.jqplot.CanvasGridRenderer.prototype.init = function(options) {
44
+ this._ctx;
45
+ this.plotBands = {
46
+ show: false,
47
+ color: 'rgb(230, 219, 179)',
48
+ axis: 'y',
49
+ start: null,
50
+ interval: 10
51
+ };
52
+ $.extend(true, this, options);
53
+ // set the shadow renderer options
54
+ var sopts = {lineJoin:'miter', lineCap:'round', fill:false, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.shadowWidth, closePath:false, strokeStyle:this.shadowColor};
55
+ this.renderer.shadowRenderer.init(sopts);
56
+ };
57
+
58
+ $.jqplot.PyramidGridRenderer.prototype.draw = function() {
59
+ this._ctx = this._elem.get(0).getContext("2d");
60
+ var ctx = this._ctx;
61
+ var axes = this._axes;
62
+ var xp = axes.xaxis.u2p;
63
+ var yp = axes.yMidAxis.u2p;
64
+ var xnudge = axes.xaxis.max/1000.0;
65
+ var xp0 = xp(0);
66
+ var xpn = xp(xnudge);
67
+ var ax = ['xaxis', 'yaxis', 'x2axis', 'y2axis','yMidAxis'];
68
+ // Add the grid onto the grid canvas. This is the bottom most layer.
69
+ ctx.save();
70
+ ctx.clearRect(0, 0, this._plotDimensions.width, this._plotDimensions.height);
71
+ ctx.fillStyle = this.backgroundColor || this.background;
72
+
73
+ ctx.fillRect(this._left, this._top, this._width, this._height);
74
+
75
+ if (this.plotBands.show) {
76
+ ctx.save();
77
+ var pb = this.plotBands;
78
+ ctx.fillStyle = pb.color;
79
+ var axis;
80
+ var x, y, w, h;
81
+ // find axis to work with
82
+ if (pb.axis.charAt(0) === 'x') {
83
+ if (axes.xaxis.show) {
84
+ axis = axes.xaxis;
85
+ }
86
+ }
87
+ else if (pb.axis.charAt(0) === 'y') {
88
+ if (axes.yaxis.show) {
89
+ axis = axes.yaxis;
90
+ }
91
+ else if (axes.y2axis.show) {
92
+ axis = axes.y2axis;
93
+ }
94
+ else if (axes.yMidAxis.show) {
95
+ axis = axes.yMidAxis;
96
+ }
97
+ }
98
+
99
+ if (axis !== undefined) {
100
+ // draw some rectangles
101
+ var start = pb.start;
102
+ if (start === null) {
103
+ start = axis.min;
104
+ }
105
+ for (var i = start; i < axis.max; i += 2 * pb.interval) {
106
+ if (axis.name.charAt(0) === 'y') {
107
+ x = this._left;
108
+ if ((i + pb.interval) < axis.max) {
109
+ y = axis.series_u2p(i + pb.interval) + this._top;
110
+ }
111
+ else {
112
+ y = axis.series_u2p(axis.max) + this._top;
113
+ }
114
+ w = this._right - this._left;
115
+ h = axis.series_u2p(start) - axis.series_u2p(start + pb.interval);
116
+ ctx.fillRect(x, y, w, h);
117
+ }
118
+ // else {
119
+ // y = 0;
120
+ // x = axis.series_u2p(i);
121
+ // h = this._height;
122
+ // w = axis.series_u2p(start + pb.interval) - axis.series_u2p(start);
123
+ // }
124
+
125
+ }
126
+ }
127
+ ctx.restore();
128
+ }
129
+
130
+ ctx.save();
131
+ ctx.lineJoin = 'miter';
132
+ ctx.lineCap = 'butt';
133
+ ctx.lineWidth = this.gridLineWidth;
134
+ ctx.strokeStyle = this.gridLineColor;
135
+ var b, e, s, m;
136
+ for (var i=5; i>0; i--) {
137
+ var name = ax[i-1];
138
+ var axis = axes[name];
139
+ var ticks = axis._ticks;
140
+ var numticks = ticks.length;
141
+ if (axis.show) {
142
+ if (axis.drawBaseline) {
143
+ var bopts = {};
144
+ if (axis.baselineWidth !== null) {
145
+ bopts.lineWidth = axis.baselineWidth;
146
+ }
147
+ if (axis.baselineColor !== null) {
148
+ bopts.strokeStyle = axis.baselineColor;
149
+ }
150
+ switch (name) {
151
+ case 'xaxis':
152
+ if (axes.yMidAxis.show) {
153
+ drawLine (this._left, this._bottom, xp0, this._bottom, bopts);
154
+ drawLine (xpn, this._bottom, this._right, this._bottom, bopts);
155
+ }
156
+ else {
157
+ drawLine (this._left, this._bottom, this._right, this._bottom, bopts);
158
+ }
159
+ break;
160
+ case 'yaxis':
161
+ drawLine (this._left, this._bottom, this._left, this._top, bopts);
162
+ break;
163
+ case 'yMidAxis':
164
+ drawLine(xp0, this._bottom, xp0, this._top, bopts);
165
+ drawLine(xpn, this._bottom, xpn, this._top, bopts);
166
+ break;
167
+ case 'x2axis':
168
+ if (axes.yMidAxis.show) {
169
+ drawLine (this._left, this._top, xp0, this._top, bopts);
170
+ drawLine (xpn, this._top, this._right, this._top, bopts);
171
+ }
172
+ else {
173
+ drawLine (this._left, this._bottom, this._right, this._bottom, bopts);
174
+ }
175
+ break;
176
+ case 'y2axis':
177
+ drawLine (this._right, this._bottom, this._right, this._top, bopts);
178
+ break;
179
+
180
+ }
181
+ }
182
+ for (var j=numticks; j>0; j--) {
183
+ var t = ticks[j-1];
184
+ if (t.show) {
185
+ var pos = Math.round(axis.u2p(t.value)) + 0.5;
186
+ switch (name) {
187
+ case 'xaxis':
188
+ // draw the grid line if we should
189
+ if (t.showGridline && this.drawGridlines && (!t.isMinorTick || axis.showMinorTicks)) {
190
+ drawLine(pos, this._top, pos, this._bottom);
191
+ }
192
+
193
+ // draw the mark
194
+ if (t.showMark && t.mark && (!t.isMinorTick || axis.showMinorTicks)) {
195
+ s = t.markSize;
196
+ m = t.mark;
197
+ var pos = Math.round(axis.u2p(t.value)) + 0.5;
198
+ switch (m) {
199
+ case 'outside':
200
+ b = this._bottom;
201
+ e = this._bottom+s;
202
+ break;
203
+ case 'inside':
204
+ b = this._bottom-s;
205
+ e = this._bottom;
206
+ break;
207
+ case 'cross':
208
+ b = this._bottom-s;
209
+ e = this._bottom+s;
210
+ break;
211
+ default:
212
+ b = this._bottom;
213
+ e = this._bottom+s;
214
+ break;
215
+ }
216
+ // draw the shadow
217
+ if (this.shadow) {
218
+ this.renderer.shadowRenderer.draw(ctx, [[pos,b],[pos,e]], {lineCap:'butt', lineWidth:this.gridLineWidth, offset:this.gridLineWidth*0.75, depth:2, fill:false, closePath:false});
219
+ }
220
+ // draw the line
221
+ drawLine(pos, b, pos, e);
222
+ }
223
+ break;
224
+ case 'yaxis':
225
+ // draw the grid line
226
+ if (t.showGridline && this.drawGridlines && (!t.isMinorTick || axis.showMinorTicks)) {
227
+ drawLine(this._right, pos, this._left, pos);
228
+ }
229
+
230
+ // draw the mark
231
+ if (t.showMark && t.mark && (!t.isMinorTick || axis.showMinorTicks)) {
232
+ s = t.markSize;
233
+ m = t.mark;
234
+ var pos = Math.round(axis.u2p(t.value)) + 0.5;
235
+ switch (m) {
236
+ case 'outside':
237
+ b = this._left-s;
238
+ e = this._left;
239
+ break;
240
+ case 'inside':
241
+ b = this._left;
242
+ e = this._left+s;
243
+ break;
244
+ case 'cross':
245
+ b = this._left-s;
246
+ e = this._left+s;
247
+ break;
248
+ default:
249
+ b = this._left-s;
250
+ e = this._left;
251
+ break;
252
+ }
253
+ // draw the shadow
254
+ if (this.shadow) {
255
+ this.renderer.shadowRenderer.draw(ctx, [[b, pos], [e, pos]], {lineCap:'butt', lineWidth:this.gridLineWidth*1.5, offset:this.gridLineWidth*0.75, fill:false, closePath:false});
256
+ }
257
+ drawLine(b, pos, e, pos, {strokeStyle:axis.borderColor});
258
+ }
259
+ break;
260
+ case 'yMidAxis':
261
+ // draw the grid line
262
+ if (t.showGridline && this.drawGridlines && (!t.isMinorTick || axis.showMinorTicks)) {
263
+ drawLine(this._left, pos, xp0, pos);
264
+ drawLine(xpn, pos, this._right, pos);
265
+ }
266
+ // draw the mark
267
+ if (t.showMark && t.mark && (!t.isMinorTick || axis.showMinorTicks)) {
268
+ s = t.markSize;
269
+ m = t.mark;
270
+ var pos = Math.round(axis.u2p(t.value)) + 0.5;
271
+
272
+ b = xp0;
273
+ e = xp0 + s;
274
+ // draw the shadow
275
+ if (this.shadow) {
276
+ this.renderer.shadowRenderer.draw(ctx, [[b, pos], [e, pos]], {lineCap:'butt', lineWidth:this.gridLineWidth*1.5, offset:this.gridLineWidth*0.75, fill:false, closePath:false});
277
+ }
278
+ drawLine(b, pos, e, pos, {strokeStyle:axis.borderColor});
279
+
280
+ b = xpn - s;
281
+ e = xpn;
282
+ // draw the shadow
283
+ if (this.shadow) {
284
+ this.renderer.shadowRenderer.draw(ctx, [[b, pos], [e, pos]], {lineCap:'butt', lineWidth:this.gridLineWidth*1.5, offset:this.gridLineWidth*0.75, fill:false, closePath:false});
285
+ }
286
+ drawLine(b, pos, e, pos, {strokeStyle:axis.borderColor});
287
+ }
288
+ break;
289
+ case 'x2axis':
290
+ // draw the grid line
291
+ if (t.showGridline && this.drawGridlines && (!t.isMinorTick || axis.showMinorTicks)) {
292
+ drawLine(pos, this._bottom, pos, this._top);
293
+ }
294
+
295
+ // draw the mark
296
+ if (t.showMark && t.mark && (!t.isMinorTick || axis.showMinorTicks)) {
297
+ s = t.markSize;
298
+ m = t.mark;
299
+ var pos = Math.round(axis.u2p(t.value)) + 0.5;
300
+ switch (m) {
301
+ case 'outside':
302
+ b = this._top-s;
303
+ e = this._top;
304
+ break;
305
+ case 'inside':
306
+ b = this._top;
307
+ e = this._top+s;
308
+ break;
309
+ case 'cross':
310
+ b = this._top-s;
311
+ e = this._top+s;
312
+ break;
313
+ default:
314
+ b = this._top-s;
315
+ e = this._top;
316
+ break;
317
+ }
318
+ // draw the shadow
319
+ if (this.shadow) {
320
+ this.renderer.shadowRenderer.draw(ctx, [[pos,b],[pos,e]], {lineCap:'butt', lineWidth:this.gridLineWidth, offset:this.gridLineWidth*0.75, depth:2, fill:false, closePath:false});
321
+ }
322
+ drawLine(pos, b, pos, e);
323
+ }
324
+ break;
325
+ case 'y2axis':
326
+ // draw the grid line
327
+ if (t.showGridline && this.drawGridlines && (!t.isMinorTick || axis.showMinorTicks)) {
328
+ drawLine(this._left, pos, this._right, pos);
329
+ }
330
+
331
+ // draw the mark
332
+ if (t.showMark && t.mark && (!t.isMinorTick || axis.showMinorTicks)) {
333
+ s = t.markSize;
334
+ m = t.mark;
335
+ var pos = Math.round(axis.u2p(t.value)) + 0.5;
336
+ switch (m) {
337
+ case 'outside':
338
+ b = this._right;
339
+ e = this._right+s;
340
+ break;
341
+ case 'inside':
342
+ b = this._right-s;
343
+ e = this._right;
344
+ break;
345
+ case 'cross':
346
+ b = this._right-s;
347
+ e = this._right+s;
348
+ break;
349
+ default:
350
+ b = this._right;
351
+ e = this._right+s;
352
+ break;
353
+ }
354
+ // draw the shadow
355
+ if (this.shadow) {
356
+ this.renderer.shadowRenderer.draw(ctx, [[b, pos], [e, pos]], {lineCap:'butt', lineWidth:this.gridLineWidth*1.5, offset:this.gridLineWidth*0.75, fill:false, closePath:false});
357
+ }
358
+ drawLine(b, pos, e, pos, {strokeStyle:axis.borderColor});
359
+ }
360
+ break;
361
+ default:
362
+ break;
363
+ }
364
+ }
365
+ }
366
+ t = null;
367
+ }
368
+ axis = null;
369
+ ticks = null;
370
+ }
371
+
372
+ ctx.restore();
373
+
374
+ function drawLine(bx, by, ex, ey, opts) {
375
+ ctx.save();
376
+ opts = opts || {};
377
+ if (opts.lineWidth == null || opts.lineWidth != 0){
378
+ $.extend(true, ctx, opts);
379
+ ctx.beginPath();
380
+ ctx.moveTo(bx, by);
381
+ ctx.lineTo(ex, ey);
382
+ ctx.stroke();
383
+ }
384
+ ctx.restore();
385
+ }
386
+
387
+ if (this.shadow) {
388
+ if (axes.yMidAxis.show) {
389
+ var points = [[this._left, this._bottom], [xp0, this._bottom]];
390
+ this.renderer.shadowRenderer.draw(ctx, points);
391
+ var points = [[xpn, this._bottom], [this._right, this._bottom], [this._right, this._top]];
392
+ this.renderer.shadowRenderer.draw(ctx, points);
393
+ var points = [[xp0, this._bottom], [xp0, this._top]];
394
+ this.renderer.shadowRenderer.draw(ctx, points);
395
+ }
396
+ else {
397
+ var points = [[this._left, this._bottom], [this._right, this._bottom], [this._right, this._top]];
398
+ this.renderer.shadowRenderer.draw(ctx, points);
399
+ }
400
+ }
401
+ // Now draw border around grid. Use axis border definitions. start at
402
+ // upper left and go clockwise.
403
+ if (this.borderWidth != 0 && this.drawBorder) {
404
+ if (axes.yMidAxis.show) {
405
+ drawLine (this._left, this._top, xp0, this._top, {lineCap:'round', strokeStyle:axes.x2axis.borderColor, lineWidth:axes.x2axis.borderWidth});
406
+ drawLine (xpn, this._top, this._right, this._top, {lineCap:'round', strokeStyle:axes.x2axis.borderColor, lineWidth:axes.x2axis.borderWidth});
407
+ drawLine (this._right, this._top, this._right, this._bottom, {lineCap:'round', strokeStyle:axes.y2axis.borderColor, lineWidth:axes.y2axis.borderWidth});
408
+ drawLine (this._right, this._bottom, xpn, this._bottom, {lineCap:'round', strokeStyle:axes.xaxis.borderColor, lineWidth:axes.xaxis.borderWidth});
409
+ drawLine (xp0, this._bottom, this._left, this._bottom, {lineCap:'round', strokeStyle:axes.xaxis.borderColor, lineWidth:axes.xaxis.borderWidth});
410
+ drawLine (this._left, this._bottom, this._left, this._top, {lineCap:'round', strokeStyle:axes.yaxis.borderColor, lineWidth:axes.yaxis.borderWidth});
411
+ drawLine (xp0, this._bottom, xp0, this._top, {lineCap:'round', strokeStyle:axes.yaxis.borderColor, lineWidth:axes.yaxis.borderWidth});
412
+ drawLine (xpn, this._bottom, xpn, this._top, {lineCap:'round', strokeStyle:axes.yaxis.borderColor, lineWidth:axes.yaxis.borderWidth});
413
+ }
414
+ else {
415
+ drawLine (this._left, this._top, this._right, this._top, {lineCap:'round', strokeStyle:axes.x2axis.borderColor, lineWidth:axes.x2axis.borderWidth});
416
+ drawLine (this._right, this._top, this._right, this._bottom, {lineCap:'round', strokeStyle:axes.y2axis.borderColor, lineWidth:axes.y2axis.borderWidth});
417
+ drawLine (this._right, this._bottom, this._left, this._bottom, {lineCap:'round', strokeStyle:axes.xaxis.borderColor, lineWidth:axes.xaxis.borderWidth});
418
+ drawLine (this._left, this._bottom, this._left, this._top, {lineCap:'round', strokeStyle:axes.yaxis.borderColor, lineWidth:axes.yaxis.borderWidth});
419
+ }
420
+ }
421
+ // ctx.lineWidth = this.borderWidth;
422
+ // ctx.strokeStyle = this.borderColor;
423
+ // ctx.strokeRect(this._left, this._top, this._width, this._height);
424
+
425
+ ctx.restore();
426
+ ctx = null;
427
+ axes = null;
428
+ };
429
+ })(jQuery);
@@ -0,0 +1,3 @@
1
+ /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
2
+ jsDate | (c) 2010-2013 Chris Leonello
3
+ */(function(a){a.jqplot.PyramidGridRenderer=function(){a.jqplot.CanvasGridRenderer.call(this)};a.jqplot.PyramidGridRenderer.prototype=new a.jqplot.CanvasGridRenderer();a.jqplot.PyramidGridRenderer.prototype.constructor=a.jqplot.PyramidGridRenderer;a.jqplot.CanvasGridRenderer.prototype.init=function(c){this._ctx;this.plotBands={show:false,color:"rgb(230, 219, 179)",axis:"y",start:null,interval:10};a.extend(true,this,c);var b={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(b)};a.jqplot.PyramidGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var D=this._ctx;var G=this._axes;var q=G.xaxis.u2p;var J=G.yMidAxis.u2p;var l=G.xaxis.max/1000;var u=q(0);var f=q(l);var r=["xaxis","yaxis","x2axis","y2axis","yMidAxis"];D.save();D.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);D.fillStyle=this.backgroundColor||this.background;D.fillRect(this._left,this._top,this._width,this._height);if(this.plotBands.show){D.save();var c=this.plotBands;D.fillStyle=c.color;var d;var o,n,p,I;if(c.axis.charAt(0)==="x"){if(G.xaxis.show){d=G.xaxis}}else{if(c.axis.charAt(0)==="y"){if(G.yaxis.show){d=G.yaxis}else{if(G.y2axis.show){d=G.y2axis}else{if(G.yMidAxis.show){d=G.yMidAxis}}}}}if(d!==undefined){var g=c.start;if(g===null){g=d.min}for(var H=g;H<d.max;H+=2*c.interval){if(d.name.charAt(0)==="y"){o=this._left;if((H+c.interval)<d.max){n=d.series_u2p(H+c.interval)+this._top}else{n=d.series_u2p(d.max)+this._top}p=this._right-this._left;I=d.series_u2p(g)-d.series_u2p(g+c.interval);D.fillRect(o,n,p,I)}}}D.restore()}D.save();D.lineJoin="miter";D.lineCap="butt";D.lineWidth=this.gridLineWidth;D.strokeStyle=this.gridLineColor;var L,K,A,C;for(var H=5;H>0;H--){var O=r[H-1];var d=G[O];var M=d._ticks;var B=M.length;if(d.show){if(d.drawBaseline){var N={};if(d.baselineWidth!==null){N.lineWidth=d.baselineWidth}if(d.baselineColor!==null){N.strokeStyle=d.baselineColor}switch(O){case"xaxis":if(G.yMidAxis.show){z(this._left,this._bottom,u,this._bottom,N);z(f,this._bottom,this._right,this._bottom,N)}else{z(this._left,this._bottom,this._right,this._bottom,N)}break;case"yaxis":z(this._left,this._bottom,this._left,this._top,N);break;case"yMidAxis":z(u,this._bottom,u,this._top,N);z(f,this._bottom,f,this._top,N);break;case"x2axis":if(G.yMidAxis.show){z(this._left,this._top,u,this._top,N);z(f,this._top,this._right,this._top,N)}else{z(this._left,this._bottom,this._right,this._bottom,N)}break;case"y2axis":z(this._right,this._bottom,this._right,this._top,N);break}}for(var E=B;E>0;E--){var v=M[E-1];if(v.show){var k=Math.round(d.u2p(v.value))+0.5;switch(O){case"xaxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(k,this._top,k,this._bottom)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._bottom;K=this._bottom+A;break;case"inside":L=this._bottom-A;K=this._bottom;break;case"cross":L=this._bottom-A;K=this._bottom+A;break;default:L=this._bottom;K=this._bottom+A;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[k,L],[k,K]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}z(k,L,k,K)}break;case"yaxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._right,k,this._left,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._left-A;K=this._left;break;case"inside":L=this._left;K=this._left+A;break;case"cross":L=this._left-A;K=this._left+A;break;default:L=this._left-A;K=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;case"yMidAxis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._left,k,u,k);z(f,k,this._right,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;L=u;K=u+A;if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor});L=f-A;K=f;if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;case"x2axis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(k,this._bottom,k,this._top)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._top-A;K=this._top;break;case"inside":L=this._top;K=this._top+A;break;case"cross":L=this._top-A;K=this._top+A;break;default:L=this._top-A;K=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[k,L],[k,K]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}z(k,L,k,K)}break;case"y2axis":if(v.showGridline&&this.drawGridlines&&(!v.isMinorTick||d.showMinorTicks)){z(this._left,k,this._right,k)}if(v.showMark&&v.mark&&(!v.isMinorTick||d.showMinorTicks)){A=v.markSize;C=v.mark;var k=Math.round(d.u2p(v.value))+0.5;switch(C){case"outside":L=this._right;K=this._right+A;break;case"inside":L=this._right-A;K=this._right;break;case"cross":L=this._right-A;K=this._right+A;break;default:L=this._right;K=this._right+A;break}if(this.shadow){this.renderer.shadowRenderer.draw(D,[[L,k],[K,k]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}z(L,k,K,k,{strokeStyle:d.borderColor})}break;default:break}}}v=null}d=null;M=null}D.restore();function z(j,i,e,b,h){D.save();h=h||{};if(h.lineWidth==null||h.lineWidth!=0){a.extend(true,D,h);D.beginPath();D.moveTo(j,i);D.lineTo(e,b);D.stroke()}D.restore()}if(this.shadow){if(G.yMidAxis.show){var F=[[this._left,this._bottom],[u,this._bottom]];this.renderer.shadowRenderer.draw(D,F);var F=[[f,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(D,F);var F=[[u,this._bottom],[u,this._top]];this.renderer.shadowRenderer.draw(D,F)}else{var F=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(D,F)}}if(this.borderWidth!=0&&this.drawBorder){if(G.yMidAxis.show){z(this._left,this._top,u,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(f,this._top,this._right,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:G.y2axis.borderColor,lineWidth:G.y2axis.borderWidth});z(this._right,this._bottom,f,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(u,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth});z(u,this._bottom,u,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth});z(f,this._bottom,f,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth})}else{z(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:G.x2axis.borderColor,lineWidth:G.x2axis.borderWidth});z(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:G.y2axis.borderColor,lineWidth:G.y2axis.borderWidth});z(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:G.xaxis.borderColor,lineWidth:G.xaxis.borderWidth});z(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:G.yaxis.borderColor,lineWidth:G.yaxis.borderWidth})}}D.restore();D=null;G=null}})(jQuery);