jquery_cheats 5.0.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/README.md +1 -0
  2. data/app/assets/javascripts/jquery_cheats/jquery_cheats.js +1 -1
  3. data/app/assets/javascripts/jquery_cheats/replacementContextMenu.js +62 -0
  4. data/jquery_cheats.gemspec +2 -2
  5. data/lib/jquery_cheats/jquery_cheats.rb +58 -0
  6. data/vendor/assets/javascripts/jqplot/excanvas.js +1438 -0
  7. data/vendor/assets/javascripts/jqplot/jquery.jqplot.js +10901 -0
  8. data/vendor/assets/javascripts/jqplot/plugins/jqplot.BezierCurveRenderer.js +312 -0
  9. data/vendor/assets/javascripts/jqplot/plugins/jqplot.BezierCurveRenderer.min.js +57 -0
  10. data/vendor/assets/javascripts/jqplot/plugins/jqplot.barRenderer.js +747 -0
  11. data/vendor/assets/javascripts/jqplot/plugins/jqplot.barRenderer.min.js +57 -0
  12. data/vendor/assets/javascripts/jqplot/plugins/jqplot.blockRenderer.js +234 -0
  13. data/vendor/assets/javascripts/jqplot/plugins/jqplot.blockRenderer.min.js +57 -0
  14. data/vendor/assets/javascripts/jqplot/plugins/jqplot.bubbleRenderer.js +754 -0
  15. data/vendor/assets/javascripts/jqplot/plugins/jqplot.bubbleRenderer.min.js +57 -0
  16. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js +202 -0
  17. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js +57 -0
  18. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisTickRenderer.js +242 -0
  19. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js +57 -0
  20. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasOverlay.js +864 -0
  21. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasOverlay.min.js +57 -0
  22. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasTextRenderer.js +448 -0
  23. data/vendor/assets/javascripts/jqplot/plugins/jqplot.canvasTextRenderer.min.js +57 -0
  24. data/vendor/assets/javascripts/jqplot/plugins/jqplot.categoryAxisRenderer.js +636 -0
  25. data/vendor/assets/javascripts/jqplot/plugins/jqplot.categoryAxisRenderer.min.js +57 -0
  26. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ciParser.js +115 -0
  27. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ciParser.min.js +57 -0
  28. data/vendor/assets/javascripts/jqplot/plugins/jqplot.cursor.js +1093 -0
  29. data/vendor/assets/javascripts/jqplot/plugins/jqplot.cursor.min.js +57 -0
  30. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dateAxisRenderer.js +702 -0
  31. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dateAxisRenderer.min.js +57 -0
  32. data/vendor/assets/javascripts/jqplot/plugins/jqplot.donutRenderer.js +800 -0
  33. data/vendor/assets/javascripts/jqplot/plugins/jqplot.donutRenderer.min.js +57 -0
  34. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dragable.js +224 -0
  35. data/vendor/assets/javascripts/jqplot/plugins/jqplot.dragable.min.js +57 -0
  36. data/vendor/assets/javascripts/jqplot/plugins/jqplot.enhancedLegendRenderer.js +241 -0
  37. data/vendor/assets/javascripts/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js +57 -0
  38. data/vendor/assets/javascripts/jqplot/plugins/jqplot.funnelRenderer.js +938 -0
  39. data/vendor/assets/javascripts/jqplot/plugins/jqplot.funnelRenderer.min.js +57 -0
  40. data/vendor/assets/javascripts/jqplot/plugins/jqplot.highlighter.js +454 -0
  41. data/vendor/assets/javascripts/jqplot/plugins/jqplot.highlighter.min.js +57 -0
  42. data/vendor/assets/javascripts/jqplot/plugins/jqplot.json2.js +475 -0
  43. data/vendor/assets/javascripts/jqplot/plugins/jqplot.json2.min.js +57 -0
  44. data/vendor/assets/javascripts/jqplot/plugins/jqplot.logAxisRenderer.js +528 -0
  45. data/vendor/assets/javascripts/jqplot/plugins/jqplot.logAxisRenderer.min.js +57 -0
  46. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoAxisRenderer.js +610 -0
  47. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoAxisRenderer.min.js +57 -0
  48. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoRenderer.js +436 -0
  49. data/vendor/assets/javascripts/jqplot/plugins/jqplot.mekkoRenderer.min.js +57 -0
  50. data/vendor/assets/javascripts/jqplot/plugins/jqplot.meterGaugeRenderer.js +1029 -0
  51. data/vendor/assets/javascripts/jqplot/plugins/jqplot.meterGaugeRenderer.min.js +57 -0
  52. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ohlcRenderer.js +372 -0
  53. data/vendor/assets/javascripts/jqplot/plugins/jqplot.ohlcRenderer.min.js +57 -0
  54. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pieRenderer.js +899 -0
  55. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pieRenderer.min.js +57 -0
  56. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pointLabels.js +362 -0
  57. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pointLabels.min.js +57 -0
  58. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidAxisRenderer.js +730 -0
  59. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidAxisRenderer.min.js +57 -0
  60. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidGridRenderer.js +423 -0
  61. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidGridRenderer.min.js +57 -0
  62. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidRenderer.js +490 -0
  63. data/vendor/assets/javascripts/jqplot/plugins/jqplot.pyramidRenderer.min.js +57 -0
  64. data/vendor/assets/javascripts/jqplot/plugins/jqplot.trendline.js +222 -0
  65. data/vendor/assets/javascripts/jqplot/plugins/jqplot.trendline.min.js +57 -0
  66. data/vendor/assets/javascripts/jquery_cheats/spinjs/spin.min.js +1 -1
  67. data/vendor/assets/stylesheets/jquery.jqplot.css +259 -0
  68. metadata +66 -3
@@ -0,0 +1,57 @@
1
+ /**
2
+ * jqPlot
3
+ * Pure JavaScript plotting plugin using jQuery
4
+ *
5
+ * Version: 1.0.0b2_r1012
6
+ *
7
+ * Copyright (c) 2009-2011 Chris Leonello
8
+ * jqPlot is currently available for use in all personal or commercial projects
9
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
10
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
11
+ * choose the license that best suits your project and use it accordingly.
12
+ *
13
+ * Although not required, the author would appreciate an email letting him
14
+ * know of any substantial use of jqPlot. You can reach the author at:
15
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
16
+ *
17
+ * If you are feeling kind and generous, consider supporting the project by
18
+ * making a donation at: http://www.jqplot.com/donate.php .
19
+ *
20
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
21
+ *
22
+ * version 2007.04.27
23
+ * author Ash Searle
24
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
25
+ * http://hexmen.com/js/sprintf.js
26
+ * The author (Ash Searle) has placed this code in the public domain:
27
+ * "This code is unrestricted: you are free to use it however you like."
28
+ *
29
+ * included jsDate library by Chris Leonello:
30
+ *
31
+ * Copyright (c) 2010-2011 Chris Leonello
32
+ *
33
+ * jsDate is currently available for use in all personal or commercial projects
34
+ * under both the MIT and GPL version 2.0 licenses. This means that you can
35
+ * choose the license that best suits your project and use it accordingly.
36
+ *
37
+ * jsDate borrows many concepts and ideas from the Date Instance
38
+ * Methods by Ken Snyder along with some parts of Ken's actual code.
39
+ *
40
+ * Ken's origianl Date Instance Methods and copyright notice:
41
+ *
42
+ * Ken Snyder (ken d snyder at gmail dot com)
43
+ * 2008-09-10
44
+ * version 2.0.2 (http://kendsnyder.com/sandbox/date/)
45
+ * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
46
+ *
47
+ * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js.
48
+ * Larry has generously given permission to adapt his code for inclusion
49
+ * into jqPlot.
50
+ *
51
+ * Larry's original code can be found here:
52
+ *
53
+ * https://github.com/lsiden/export-jqplot-to-png
54
+ *
55
+ *
56
+ */
57
+ (function(e){e.jqplot.PieRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.PieRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.PieRenderer.prototype.constructor=e.jqplot.PieRenderer;e.jqplot.PieRenderer.prototype.init=function(q,u){this.diameter=null;this.padding=20;this.sliceMargin=0;this.fill=true;this.shadowOffset=2;this.shadowAlpha=0.07;this.shadowDepth=5;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.dataLabels="percent";this.showDataLabels=false;this.dataLabelFormatString=null;this.dataLabelThreshold=3;this.dataLabelPositionFactor=0.52;this.dataLabelNudge=2;this.dataLabelCenterOn=true;this.startAngle=0;this.tickRenderer=e.jqplot.PieTickRenderer;this._drawData=true;this._type="pie";if(q.highlightMouseDown&&q.highlightMouseOver==null){q.highlightMouseOver=false}e.extend(true,this,q);if(this.sliceMargin<0){this.sliceMargin=0}this._diameter=null;this._radius=null;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var s=0;s<this.seriesColors.length;s++){var r=e.jqplot.getColorComponents(this.seriesColors[s]);var o=[r[0],r[1],r[2]];var t=o[0]+o[1]+o[2];for(var p=0;p<3;p++){o[p]=(t>570)?o[p]*0.8:o[p]+0.3*(255-o[p]);o[p]=parseInt(o[p],10)}this.highlightColors.push("rgb("+o[0]+","+o[1]+","+o[2]+")")}}this.highlightColorGenerator=new e.jqplot.ColorGenerator(this.highlightColors);u.postParseOptionsHooks.addOnce(m);u.postInitHooks.addOnce(g);u.eventListenerHooks.addOnce("jqplotMouseMove",b);u.eventListenerHooks.addOnce("jqplotMouseDown",a);u.eventListenerHooks.addOnce("jqplotMouseUp",l);u.eventListenerHooks.addOnce("jqplotClick",f);u.eventListenerHooks.addOnce("jqplotRightClick",n);u.postDrawHooks.addOnce(i)};e.jqplot.PieRenderer.prototype.setGridData=function(t){var p=[];var u=[];var o=this.startAngle/180*Math.PI;var s=0;this._drawData=false;for(var r=0;r<this.data.length;r++){if(this.data[r][1]!=0){this._drawData=true}p.push(this.data[r][1]);u.push([this.data[r][0]]);if(r>0){p[r]+=p[r-1]}s+=this.data[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r<p.length;r++){u[r][1]=p[r]*q;u[r][2]=this.data[r][1]/s}this.gridData=u};e.jqplot.PieRenderer.prototype.makeGridData=function(t,u){var p=[];var v=[];var s=0;var o=this.startAngle/180*Math.PI;this._drawData=false;for(var r=0;r<t.length;r++){if(this.data[r][1]!=0){this._drawData=true}p.push(t[r][1]);v.push([t[r][0]]);if(r>0){p[r]+=p[r-1]}s+=t[r][1]}var q=Math.PI*2/p[p.length-1];for(var r=0;r<p.length;r++){v[r][1]=p[r]*q;v[r][2]=t[r][1]/s}return v};function h(o){return Math.sin((o-(o-Math.PI)/8/Math.PI)/2)}function j(u,t,o,v,r){var w=0;var q=t-u;var s=Math.abs(q);var p=o;if(v==false){p+=r}if(p>0&&s>0.01&&s<6.282){w=parseFloat(p)/2/h(q)}return w}e.jqplot.PieRenderer.prototype.drawSlice=function(B,z,y,u,w){if(this._drawData){var p=this._radius;var A=this.fill;var x=this.lineWidth;var s=this.sliceMargin;if(this.fill==false){s+=this.lineWidth}B.save();B.translate(this._center[0],this._center[1]);var D=j(z,y,this.sliceMargin,this.fill,this.lineWidth);var o=D*Math.cos((z+y)/2);var C=D*Math.sin((z+y)/2);if((y-z)<=Math.PI){p-=D}else{p+=D}B.translate(o,C);if(w){for(var v=0,t=this.shadowDepth;v<t;v++){B.save();B.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI),this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));q(p)}for(var v=0,t=this.shadowDepth;v<t;v++){B.restore()}}else{q(p)}B.restore()}function q(r){if(y>6.282+this.startAngle){y=6.282+this.startAngle;if(z>y){z=6.281+this.startAngle}}if(z>=y){return}B.beginPath();B.fillStyle=u;B.strokeStyle=u;B.lineWidth=x;B.arc(0,0,r,z,y,false);B.lineTo(0,0);B.closePath();if(A){B.fill()}else{B.stroke()}}};e.jqplot.PieRenderer.prototype.draw=function(B,z,E,o){var W;var H=(E!=undefined)?E:{};var t=0;var s=0;var N=1;var L=new e.jqplot.ColorGenerator(this.seriesColors);if(E.legendInfo&&E.legendInfo.placement=="insideGrid"){var J=E.legendInfo;switch(J.location){case"nw":t=J.width+J.xoffset;break;case"w":t=J.width+J.xoffset;break;case"sw":t=J.width+J.xoffset;break;case"ne":t=J.width+J.xoffset;N=-1;break;case"e":t=J.width+J.xoffset;N=-1;break;case"se":t=J.width+J.xoffset;N=-1;break;case"n":s=J.height+J.yoffset;break;case"s":s=J.height+J.yoffset;N=-1;break;default:break}}var K=(H.shadow!=undefined)?H.shadow:this.shadow;var A=(H.fill!=undefined)?H.fill:this.fill;var C=B.canvas.width;var I=B.canvas.height;var Q=C-t-2*this.padding;var X=I-s-2*this.padding;var M=Math.min(Q,X);var Y=M;this._sliceAngles=[];var v=this.sliceMargin;if(this.fill==false){v+=this.lineWidth}var q;var G=0;var R,aa,Z,ab;var D=this.startAngle/180*Math.PI;for(var W=0,V=z.length;W<V;W++){aa=(W==0)?D:z[W-1][1]+D;Z=z[W][1]+D;this._sliceAngles.push([aa,Z]);q=j(aa,Z,this.sliceMargin,this.fill,this.lineWidth);if(Math.abs(Z-aa)>Math.PI){G=Math.max(q,G)}}if(this.diameter!=null&&this.diameter>0){this._diameter=this.diameter-2*G}else{this._diameter=Y-2*G}if(this._diameter<6){e.jqplot.log("Diameter of pie too small, not rendering.");return}var S=this._radius=this._diameter/2;this._center=[(C-N*t)/2+N*t+G*Math.cos(D),(I-N*s)/2+N*s+G*Math.sin(D)];if(this.shadow){for(var W=0,V=z.length;W<V;W++){ab="rgba(0,0,0,"+this.shadowAlpha+")";this.renderer.drawSlice.call(this,B,this._sliceAngles[W][0],this._sliceAngles[W][1],ab,true)}}for(var W=0;W<z.length;W++){this.renderer.drawSlice.call(this,B,this._sliceAngles[W][0],this._sliceAngles[W][1],L.next(),false);if(this.showDataLabels&&z[W][2]*100>=this.dataLabelThreshold){var F,U=(this._sliceAngles[W][0]+this._sliceAngles[W][1])/2,T;if(this.dataLabels=="label"){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,z[W][0])}else{if(this.dataLabels=="value"){F=this.dataLabelFormatString||"%d";T=e.jqplot.sprintf(F,this.data[W][1])}else{if(this.dataLabels=="percent"){F=this.dataLabelFormatString||"%d%%";T=e.jqplot.sprintf(F,z[W][2]*100)}else{if(this.dataLabels.constructor==Array){F=this.dataLabelFormatString||"%s";T=e.jqplot.sprintf(F,this.dataLabels[W])}}}}var p=(this._radius)*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var P=this._center[0]+Math.cos(U)*p+this.canvas._offsets.left;var O=this._center[1]+Math.sin(U)*p+this.canvas._offsets.top;var u=e('<div class="jqplot-pie-series jqplot-data-label" style="position:absolute;">'+T+"</div>").insertBefore(o.eventCanvas._elem);if(this.dataLabelCenterOn){P-=u.width()/2;O-=u.height()/2}else{P-=u.width()*Math.sin(U/2);O-=u.height()/2}P=Math.round(P);O=Math.round(O);u.css({left:P,top:O})}}};e.jqplot.PieAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.PieAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.PieAxisRenderer.prototype.constructor=e.jqplot.PieAxisRenderer;e.jqplot.PieAxisRenderer.prototype.init=function(o){this.tickRenderer=e.jqplot.PieTickRenderer;e.extend(true,this,o);this._dataBounds={min:0,max:100};this.min=0;this.max=100;this.showTicks=false;this.ticks=[];this.showMark=false;this.show=false};e.jqplot.PieLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.PieLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.PieLegendRenderer.prototype.constructor=e.jqplot.PieLegendRenderer;e.jqplot.PieLegendRenderer.prototype.init=function(o){this.numberRows=null;this.numberColumns=null;e.extend(true,this,o)};e.jqplot.PieLegendRenderer.prototype.draw=function(){var r=this;if(this.show){var B=this._series;this._elem=e(document.createElement("table"));this._elem.addClass("jqplot-table-legend");var E={position:"absolute"};if(this.background){E.background=this.background}if(this.border){E.border=this.border}if(this.fontSize){E.fontSize=this.fontSize}if(this.fontFamily){E.fontFamily=this.fontFamily}if(this.textColor){E.textColor=this.textColor}if(this.marginTop!=null){E.marginTop=this.marginTop}if(this.marginBottom!=null){E.marginBottom=this.marginBottom}if(this.marginLeft!=null){E.marginLeft=this.marginLeft}if(this.marginRight!=null){E.marginRight=this.marginRight}this._elem.css(E);var I=false,A=false,o,y;var C=B[0];var p=new e.jqplot.ColorGenerator(C.seriesColors);if(C.show){var J=C.data;if(this.numberRows){o=this.numberRows;if(!this.numberColumns){y=Math.ceil(J.length/o)}else{y=this.numberColumns}}else{if(this.numberColumns){y=this.numberColumns;o=Math.ceil(J.length/this.numberColumns)}else{o=J.length;y=1}}var H,G;var q,w,v;var x,z,F;var D=0;var u,t;for(H=0;H<o;H++){q=e(document.createElement("tr"));q.addClass("jqplot-table-legend");if(A){q.prependTo(this._elem)}else{q.appendTo(this._elem)}for(G=0;G<y;G++){if(D<J.length){x=this.labels[D]||J[D][0].toString();F=p.next();if(!A){if(H>0){I=true}else{I=false}}else{if(H==o-1){I=false}else{I=true}}z=(I)?this.rowSpacing:"0";w=e(document.createElement("td"));w.addClass("jqplot-table-legend jqplot-table-legend-swatch");w.css({textAlign:"center",paddingTop:z});u=e(document.createElement("div"));u.addClass("jqplot-table-legend-swatch-outline");t=e(document.createElement("div"));t.addClass("jqplot-table-legend-swatch");t.css({backgroundColor:F,borderColor:F});w.append(u.append(t));v=e(document.createElement("td"));v.addClass("jqplot-table-legend jqplot-table-legend-label");v.css("paddingTop",z);if(this.escapeHtml){v.text(x)}else{v.html(x)}if(A){v.prependTo(q);w.prependTo(q)}else{w.appendTo(q);v.appendTo(q)}I=true}D++}}}}return this._elem};e.jqplot.PieRenderer.prototype.handleMove=function(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];r.target.trigger("jqplotDataMouseOver",o);if(r.series[o[0]].highlightMouseOver&&!(o[0]==r.plugins.pieRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){r.target.trigger("jqplotDataHighlight",o);d(r,o[0],o[1])}}else{if(s==null){k(r)}}};function c(s,r,p){p=p||{};p.axesDefaults=p.axesDefaults||{};p.legend=p.legend||{};p.seriesDefaults=p.seriesDefaults||{};var o=false;if(p.seriesDefaults.renderer==e.jqplot.PieRenderer){o=true}else{if(p.series){for(var q=0;q<p.series.length;q++){if(p.series[q].renderer==e.jqplot.PieRenderer){o=true}}}}if(o){p.axesDefaults.renderer=e.jqplot.PieAxisRenderer;p.legend.renderer=e.jqplot.PieLegendRenderer;p.legend.preDraw=true;p.seriesDefaults.pointLabels={show:false}}}function g(r,q,o){for(var p=0;p<this.series.length;p++){if(this.series[p].renderer.constructor==e.jqplot.PieRenderer){if(this.series[p].highlightMouseOver){this.series[p].highlightMouseDown=false}}}}function m(o){for(var p=0;p<this.series.length;p++){this.series[p].seriesColors=this.seriesColors;this.series[p].colorGenerator=e.jqplot.colorGenerator}}function d(t,r,q){var p=t.series[r];var o=t.plugins.pieRenderer.highlightCanvas;o._ctx.clearRect(0,0,o._ctx.canvas.width,o._ctx.canvas.height);p._highlightedPoint=q;t.plugins.pieRenderer.highlightedSeriesIndex=r;p.renderer.drawSlice.call(p,o._ctx,p._sliceAngles[q][0],p._sliceAngles[q][1],p.highlightColorGenerator.get(q),false)}function k(q){var o=q.plugins.pieRenderer.highlightCanvas;o._ctx.clearRect(0,0,o._ctx.canvas.width,o._ctx.canvas.height);for(var p=0;p<q.series.length;p++){q.series[p]._highlightedPoint=null}q.plugins.pieRenderer.highlightedSeriesIndex=null;q.target.trigger("jqplotDataUnhighlight")}function b(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];var p=jQuery.Event("jqplotDataMouseOver");p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q);if(t.series[q[0]].highlightMouseOver&&!(q[0]==t.plugins.pieRenderer.highlightedSeriesIndex&&q[1]==t.series[q[0]]._highlightedPoint)){var o=jQuery.Event("jqplotDataHighlight");o.pageX=s.pageX;o.pageY=s.pageY;t.target.trigger(o,q);d(t,q[0],q[1])}}else{if(u==null){k(t)}}}function a(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];if(s.series[p[0]].highlightMouseDown&&!(p[0]==s.plugins.pieRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var o=jQuery.Event("jqplotDataHighlight");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);d(s,p[0],p[1])}}else{if(t==null){k(s)}}}function l(q,p,t,s,r){var o=r.plugins.pieRenderer.highlightedSeriesIndex;if(o!=null&&r.series[o].highlightMouseDown){k(r)}}function f(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataClick");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p)}}function n(s,r,v,u,t){if(u){var q=[u.seriesIndex,u.pointIndex,u.data];var o=t.plugins.pieRenderer.highlightedSeriesIndex;if(o!=null&&t.series[o].highlightMouseDown){k(t)}var p=jQuery.Event("jqplotDataRightClick");p.pageX=s.pageX;p.pageY=s.pageY;t.target.trigger(p,q)}}function i(){if(this.plugins.pieRenderer&&this.plugins.pieRenderer.highlightCanvas){this.plugins.pieRenderer.highlightCanvas.resetCanvas();this.plugins.pieRenderer.highlightCanvas=null}this.plugins.pieRenderer={highlightedSeriesIndex:null};this.plugins.pieRenderer.highlightCanvas=new e.jqplot.GenericCanvas();var p=e(this.targetId+" .jqplot-data-label");if(p.length){e(p[0]).before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pieRenderer-highlight-canvas",this._plotDimensions,this))}else{this.eventCanvas._elem.before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-pieRenderer-highlight-canvas",this._plotDimensions,this))}var o=this.plugins.pieRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(q){k(q.data.plot)})}e.jqplot.preInitHooks.push(c);e.jqplot.PieTickRenderer=function(){e.jqplot.AxisTickRenderer.call(this)};e.jqplot.PieTickRenderer.prototype=new e.jqplot.AxisTickRenderer();e.jqplot.PieTickRenderer.prototype.constructor=e.jqplot.PieTickRenderer})(jQuery);
@@ -0,0 +1,362 @@
1
+ /**
2
+ * jqPlot
3
+ * Pure JavaScript plotting plugin using jQuery
4
+ *
5
+ * Version: 1.0.0b2_r1012
6
+ *
7
+ * Copyright (c) 2009-2011 Chris Leonello
8
+ * jqPlot is currently available for use in all personal or commercial projects
9
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
10
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
11
+ * choose the license that best suits your project and use it accordingly.
12
+ *
13
+ * Although not required, the author would appreciate an email letting him
14
+ * know of any substantial use of jqPlot. You can reach the author at:
15
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
16
+ *
17
+ * If you are feeling kind and generous, consider supporting the project by
18
+ * making a donation at: http://www.jqplot.com/donate.php .
19
+ *
20
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
21
+ *
22
+ * version 2007.04.27
23
+ * author Ash Searle
24
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
25
+ * http://hexmen.com/js/sprintf.js
26
+ * The author (Ash Searle) has placed this code in the public domain:
27
+ * "This code is unrestricted: you are free to use it however you like."
28
+ *
29
+ */
30
+ (function($) {
31
+
32
+ /**
33
+ * Class: $.jqplot.PointLabels
34
+ * Plugin for putting labels at the data points.
35
+ *
36
+ * To use this plugin, include the js
37
+ * file in your source:
38
+ *
39
+ * > <script type="text/javascript" src="plugins/jqplot.pointLabels.js"></script>
40
+ *
41
+ * By default, the last value in the data ponit array in the data series is used
42
+ * for the label. For most series renderers, extra data can be added to the
43
+ * data point arrays and the last value will be used as the label.
44
+ *
45
+ * For instance,
46
+ * this series:
47
+ *
48
+ * > [[1,4], [3,5], [7,2]]
49
+ *
50
+ * Would, by default, use the y values in the labels.
51
+ * Extra data can be added to the series like so:
52
+ *
53
+ * > [[1,4,'mid'], [3 5,'hi'], [7,2,'low']]
54
+ *
55
+ * And now the point labels would be 'mid', 'low', and 'hi'.
56
+ *
57
+ * Options to the point labels and a custom labels array can be passed into the
58
+ * "pointLabels" option on the series option like so:
59
+ *
60
+ * > series:[{pointLabels:{
61
+ * > labels:['mid', 'hi', 'low'],
62
+ * > location:'se',
63
+ * > ypadding: 12
64
+ * > }
65
+ * > }]
66
+ *
67
+ * A custom labels array in the options takes precendence over any labels
68
+ * in the series data. If you have a custom labels array in the options,
69
+ * but still want to use values from the series array as labels, set the
70
+ * "labelsFromSeries" option to true.
71
+ *
72
+ * By default, html entities (<, >, etc.) are escaped in point labels.
73
+ * If you want to include actual html markup in the labels,
74
+ * set the "escapeHTML" option to false.
75
+ *
76
+ */
77
+ $.jqplot.PointLabels = function(options) {
78
+ // Group: Properties
79
+ //
80
+ // prop: show
81
+ // show the labels or not.
82
+ this.show = $.jqplot.config.enablePlugins;
83
+ // prop: location
84
+ // compass location where to position the label around the point.
85
+ // 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw'
86
+ this.location = 'n';
87
+ // prop: labelsFromSeries
88
+ // true to use labels within data point arrays.
89
+ this.labelsFromSeries = false;
90
+ // prop: seriesLabelIndex
91
+ // array index for location of labels within data point arrays.
92
+ // if null, will use the last element of the data point array.
93
+ this.seriesLabelIndex = null;
94
+ // prop: labels
95
+ // array of arrays of labels, one array for each series.
96
+ this.labels = [];
97
+ // actual labels that will get displayed.
98
+ // needed to preserve user specified labels in labels array.
99
+ this._labels = [];
100
+ // prop: stackedValue
101
+ // true to display value as stacked in a stacked plot.
102
+ // no effect if labels is specified.
103
+ this.stackedValue = false;
104
+ // prop: ypadding
105
+ // vertical padding in pixels between point and label
106
+ this.ypadding = 6;
107
+ // prop: xpadding
108
+ // horizontal padding in pixels between point and label
109
+ this.xpadding = 6;
110
+ // prop: escapeHTML
111
+ // true to escape html entities in the labels.
112
+ // If you want to include markup in the labels, set to false.
113
+ this.escapeHTML = true;
114
+ // prop: edgeTolerance
115
+ // Number of pixels that the label must be away from an axis
116
+ // boundary in order to be drawn. Negative values will allow overlap
117
+ // with the grid boundaries.
118
+ this.edgeTolerance = -5;
119
+ // prop: formatter
120
+ // A class of a formatter for the tick text. sprintf by default.
121
+ this.formatter = $.jqplot.DefaultTickFormatter;
122
+ // prop: formatString
123
+ // string passed to the formatter.
124
+ this.formatString = '';
125
+ // prop: hideZeros
126
+ // true to not show a label for a value which is 0.
127
+ this.hideZeros = false;
128
+ this._elems = [];
129
+
130
+ $.extend(true, this, options);
131
+ };
132
+
133
+ var locations = ['nw', 'n', 'ne', 'e', 'se', 's', 'sw', 'w'];
134
+ var locationIndicies = {'nw':0, 'n':1, 'ne':2, 'e':3, 'se':4, 's':5, 'sw':6, 'w':7};
135
+ var oppositeLocations = ['se', 's', 'sw', 'w', 'nw', 'n', 'ne', 'e'];
136
+
137
+ // called with scope of a series
138
+ $.jqplot.PointLabels.init = function (target, data, seriesDefaults, opts, plot){
139
+ var options = $.extend(true, {}, seriesDefaults, opts);
140
+ options.pointLabels = options.pointLabels || {};
141
+ if (this.renderer.constructor === $.jqplot.BarRenderer && this.barDirection === 'horizontal' && !options.pointLabels.location) {
142
+ options.pointLabels.location = 'e';
143
+ }
144
+ // add a pointLabels attribute to the series plugins
145
+ this.plugins.pointLabels = new $.jqplot.PointLabels(options.pointLabels);
146
+ this.plugins.pointLabels.setLabels.call(this);
147
+ };
148
+
149
+ // called with scope of series
150
+ $.jqplot.PointLabels.prototype.setLabels = function() {
151
+ var p = this.plugins.pointLabels;
152
+ var labelIdx;
153
+ if (p.seriesLabelIndex != null) {
154
+ labelIdx = p.seriesLabelIndex;
155
+ }
156
+ else if (this.renderer.constructor === $.jqplot.BarRenderer && this.barDirection === 'horizontal') {
157
+ labelIdx = 0;
158
+ }
159
+ else {
160
+ labelIdx = (this._plotData.length === 0) ? 0 : this._plotData[0].length -1;
161
+ }
162
+ p._labels = [];
163
+ if (p.labels.length === 0 || p.labelsFromSeries) {
164
+ if (p.stackedValue) {
165
+ if (this._plotData.length && this._plotData[0].length){
166
+ // var idx = p.seriesLabelIndex || this._plotData[0].length -1;
167
+ for (var i=0; i<this._plotData.length; i++) {
168
+ p._labels.push(this._plotData[i][labelIdx]);
169
+ }
170
+ }
171
+ }
172
+ else {
173
+ var d = this._plotData;
174
+ if (this.renderer.constructor === $.jqplot.BarRenderer && this.waterfall) {
175
+ d = this._data;
176
+ }
177
+ if (d.length && d[0].length) {
178
+ // var idx = p.seriesLabelIndex || d[0].length -1;
179
+ for (var i=0; i<d.length; i++) {
180
+ p._labels.push(d[i][labelIdx]);
181
+ }
182
+ }
183
+ d = null;
184
+ }
185
+ }
186
+ else if (p.labels.length){
187
+ p._labels = p.labels;
188
+ }
189
+ };
190
+
191
+ $.jqplot.PointLabels.prototype.xOffset = function(elem, location, padding) {
192
+ location = location || this.location;
193
+ padding = padding || this.xpadding;
194
+ var offset;
195
+
196
+ switch (location) {
197
+ case 'nw':
198
+ offset = -elem.outerWidth(true) - this.xpadding;
199
+ break;
200
+ case 'n':
201
+ offset = -elem.outerWidth(true)/2;
202
+ break;
203
+ case 'ne':
204
+ offset = this.xpadding;
205
+ break;
206
+ case 'e':
207
+ offset = this.xpadding;
208
+ break;
209
+ case 'se':
210
+ offset = this.xpadding;
211
+ break;
212
+ case 's':
213
+ offset = -elem.outerWidth(true)/2;
214
+ break;
215
+ case 'sw':
216
+ offset = -elem.outerWidth(true) - this.xpadding;
217
+ break;
218
+ case 'w':
219
+ offset = -elem.outerWidth(true) - this.xpadding;
220
+ break;
221
+ default: // same as 'nw'
222
+ offset = -elem.outerWidth(true) - this.xpadding;
223
+ break;
224
+ }
225
+ return offset;
226
+ };
227
+
228
+ $.jqplot.PointLabels.prototype.yOffset = function(elem, location, padding) {
229
+ location = location || this.location;
230
+ padding = padding || this.xpadding;
231
+ var offset;
232
+
233
+ switch (location) {
234
+ case 'nw':
235
+ offset = -elem.outerHeight(true) - this.ypadding;
236
+ break;
237
+ case 'n':
238
+ offset = -elem.outerHeight(true) - this.ypadding;
239
+ break;
240
+ case 'ne':
241
+ offset = -elem.outerHeight(true) - this.ypadding;
242
+ break;
243
+ case 'e':
244
+ offset = -elem.outerHeight(true)/2;
245
+ break;
246
+ case 'se':
247
+ offset = this.ypadding;
248
+ break;
249
+ case 's':
250
+ offset = this.ypadding;
251
+ break;
252
+ case 'sw':
253
+ offset = this.ypadding;
254
+ break;
255
+ case 'w':
256
+ offset = -elem.outerHeight(true)/2;
257
+ break;
258
+ default: // same as 'nw'
259
+ offset = -elem.outerHeight(true) - this.ypadding;
260
+ break;
261
+ }
262
+ return offset;
263
+ };
264
+
265
+ // called with scope of series
266
+ $.jqplot.PointLabels.draw = function (sctx, options, plot) {
267
+ var p = this.plugins.pointLabels;
268
+ // set labels again in case they have changed.
269
+ p.setLabels.call(this);
270
+ // remove any previous labels
271
+ for (var i=0; i<p._elems.length; i++) {
272
+ // Memory Leaks patch
273
+ // p._elems[i].remove();
274
+ p._elems[i].emptyForce();
275
+ }
276
+ p._elems.splice(0, p._elems.length);
277
+
278
+ if (p.show) {
279
+ var ax = '_'+this._stackAxis+'axis';
280
+
281
+ if (!p.formatString) {
282
+ p.formatString = this[ax]._ticks[0].formatString;
283
+ p.formatter = this[ax]._ticks[0].formatter;
284
+ }
285
+
286
+ var pd = this._plotData;
287
+ var xax = this._xaxis;
288
+ var yax = this._yaxis;
289
+ var elem, helem;
290
+
291
+ for (var i=0, l=p._labels.length; i < l; i++) {
292
+ var label = p._labels[i];
293
+
294
+ if (p.hideZeros && parseInt(p._labels[i], 10) == 0) {
295
+ label = '';
296
+ }
297
+
298
+ if (label != null) {
299
+ label = p.formatter(p.formatString, label);
300
+ }
301
+
302
+ helem = document.createElement('div');
303
+ p._elems[i] = $(helem);
304
+
305
+ elem = p._elems[i];
306
+
307
+
308
+ elem.addClass('jqplot-point-label jqplot-series-'+this.index+' jqplot-point-'+i);
309
+ elem.css('position', 'absolute');
310
+ elem.insertAfter(sctx.canvas);
311
+
312
+ if (p.escapeHTML) {
313
+ elem.text(label);
314
+ }
315
+ else {
316
+ elem.html(label);
317
+ }
318
+ var location = p.location;
319
+ if ((this.fillToZero && pd[i][1] < 0) || (this.fillToZero && this._type === 'bar' && this.barDirection === 'horizontal' && pd[i][0] < 0) || (this.waterfall && parseInt(label, 10)) < 0) {
320
+ location = oppositeLocations[locationIndicies[location]];
321
+ }
322
+ var ell = xax.u2p(pd[i][0]) + p.xOffset(elem, location);
323
+ var elt = yax.u2p(pd[i][1]) + p.yOffset(elem, location);
324
+ if (this.renderer.constructor == $.jqplot.BarRenderer) {
325
+ if (this.barDirection == "vertical") {
326
+ ell += this._barNudge;
327
+ }
328
+ else {
329
+ elt -= this._barNudge;
330
+ }
331
+ }
332
+ elem.css('left', ell);
333
+ elem.css('top', elt);
334
+ var elr = ell + elem.width();
335
+ var elb = elt + elem.height();
336
+ var et = p.edgeTolerance;
337
+ var scl = $(sctx.canvas).position().left;
338
+ var sct = $(sctx.canvas).position().top;
339
+ var scr = sctx.canvas.width + scl;
340
+ var scb = sctx.canvas.height + sct;
341
+ // if label is outside of allowed area, remove it
342
+ if (ell - et < scl || elt - et < sct || elr + et > scr || elb + et > scb) {
343
+ elem.remove();
344
+ }
345
+
346
+ elem = null;
347
+ helem = null;
348
+ }
349
+
350
+ // finally, animate them if the series is animated
351
+ // if (this.renderer.animation && this.renderer.animation._supported && this.renderer.animation.show && plot._drawCount < 2) {
352
+ // var sel = '.jqplot-point-label.jqplot-series-'+this.index;
353
+ // $(sel).hide();
354
+ // $(sel).fadeIn(1000);
355
+ // }
356
+
357
+ }
358
+ };
359
+
360
+ $.jqplot.postSeriesInitHooks.push($.jqplot.PointLabels.init);
361
+ $.jqplot.postDrawSeriesHooks.push($.jqplot.PointLabels.draw);
362
+ })(jQuery);
@@ -0,0 +1,57 @@
1
+ /**
2
+ * jqPlot
3
+ * Pure JavaScript plotting plugin using jQuery
4
+ *
5
+ * Version: 1.0.0b2_r1012
6
+ *
7
+ * Copyright (c) 2009-2011 Chris Leonello
8
+ * jqPlot is currently available for use in all personal or commercial projects
9
+ * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
10
+ * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
11
+ * choose the license that best suits your project and use it accordingly.
12
+ *
13
+ * Although not required, the author would appreciate an email letting him
14
+ * know of any substantial use of jqPlot. You can reach the author at:
15
+ * chris at jqplot dot com or see http://www.jqplot.com/info.php .
16
+ *
17
+ * If you are feeling kind and generous, consider supporting the project by
18
+ * making a donation at: http://www.jqplot.com/donate.php .
19
+ *
20
+ * sprintf functions contained in jqplot.sprintf.js by Ash Searle:
21
+ *
22
+ * version 2007.04.27
23
+ * author Ash Searle
24
+ * http://hexmen.com/blog/2007/03/printf-sprintf/
25
+ * http://hexmen.com/js/sprintf.js
26
+ * The author (Ash Searle) has placed this code in the public domain:
27
+ * "This code is unrestricted: you are free to use it however you like."
28
+ *
29
+ * included jsDate library by Chris Leonello:
30
+ *
31
+ * Copyright (c) 2010-2011 Chris Leonello
32
+ *
33
+ * jsDate is currently available for use in all personal or commercial projects
34
+ * under both the MIT and GPL version 2.0 licenses. This means that you can
35
+ * choose the license that best suits your project and use it accordingly.
36
+ *
37
+ * jsDate borrows many concepts and ideas from the Date Instance
38
+ * Methods by Ken Snyder along with some parts of Ken's actual code.
39
+ *
40
+ * Ken's origianl Date Instance Methods and copyright notice:
41
+ *
42
+ * Ken Snyder (ken d snyder at gmail dot com)
43
+ * 2008-09-10
44
+ * version 2.0.2 (http://kendsnyder.com/sandbox/date/)
45
+ * Creative Commons Attribution License 3.0 (http://creativecommons.org/licenses/by/3.0/)
46
+ *
47
+ * jqplotToImage function based on Larry Siden's export-jqplot-to-png.js.
48
+ * Larry has generously given permission to adapt his code for inclusion
49
+ * into jqPlot.
50
+ *
51
+ * Larry's original code can be found here:
52
+ *
53
+ * https://github.com/lsiden/export-jqplot-to-png
54
+ *
55
+ *
56
+ */
57
+ (function(c){c.jqplot.PointLabels=function(e){this.show=c.jqplot.config.enablePlugins;this.location="n";this.labelsFromSeries=false;this.seriesLabelIndex=null;this.labels=[];this._labels=[];this.stackedValue=false;this.ypadding=6;this.xpadding=6;this.escapeHTML=true;this.edgeTolerance=-5;this.formatter=c.jqplot.DefaultTickFormatter;this.formatString="";this.hideZeros=false;this._elems=[];c.extend(true,this,e)};var a=["nw","n","ne","e","se","s","sw","w"];var d={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7};var b=["se","s","sw","w","nw","n","ne","e"];c.jqplot.PointLabels.init=function(j,h,f,g,i){var e=c.extend(true,{},f,g);e.pointLabels=e.pointLabels||{};if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"&&!e.pointLabels.location){e.pointLabels.location="e"}this.plugins.pointLabels=new c.jqplot.PointLabels(e.pointLabels);this.plugins.pointLabels.setLabels.call(this)};c.jqplot.PointLabels.prototype.setLabels=function(){var f=this.plugins.pointLabels;var h;if(f.seriesLabelIndex!=null){h=f.seriesLabelIndex}else{if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"){h=0}else{h=(this._plotData.length===0)?0:this._plotData[0].length-1}}f._labels=[];if(f.labels.length===0||f.labelsFromSeries){if(f.stackedValue){if(this._plotData.length&&this._plotData[0].length){for(var e=0;e<this._plotData.length;e++){f._labels.push(this._plotData[e][h])}}}else{var g=this._plotData;if(this.renderer.constructor===c.jqplot.BarRenderer&&this.waterfall){g=this._data}if(g.length&&g[0].length){for(var e=0;e<g.length;e++){f._labels.push(g[e][h])}}g=null}}else{if(f.labels.length){f._labels=f.labels}}};c.jqplot.PointLabels.prototype.xOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerWidth(true)-this.xpadding;break;case"n":h=-f.outerWidth(true)/2;break;case"ne":h=this.xpadding;break;case"e":h=this.xpadding;break;case"se":h=this.xpadding;break;case"s":h=-f.outerWidth(true)/2;break;case"sw":h=-f.outerWidth(true)-this.xpadding;break;case"w":h=-f.outerWidth(true)-this.xpadding;break;default:h=-f.outerWidth(true)-this.xpadding;break}return h};c.jqplot.PointLabels.prototype.yOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerHeight(true)-this.ypadding;break;case"n":h=-f.outerHeight(true)-this.ypadding;break;case"ne":h=-f.outerHeight(true)-this.ypadding;break;case"e":h=-f.outerHeight(true)/2;break;case"se":h=this.ypadding;break;case"s":h=this.ypadding;break;case"sw":h=this.ypadding;break;case"w":h=-f.outerHeight(true)/2;break;default:h=-f.outerHeight(true)-this.ypadding;break}return h};c.jqplot.PointLabels.draw=function(x,j,v){var t=this.plugins.pointLabels;t.setLabels.call(this);for(var w=0;w<t._elems.length;w++){t._elems[w].emptyForce()}t._elems.splice(0,t._elems.length);if(t.show){var r="_"+this._stackAxis+"axis";if(!t.formatString){t.formatString=this[r]._ticks[0].formatString;t.formatter=this[r]._ticks[0].formatter}var D=this._plotData;var A=this._xaxis;var q=this._yaxis;var z,f;for(var w=0,u=t._labels.length;w<u;w++){var o=t._labels[w];if(t.hideZeros&&parseInt(t._labels[w],10)==0){o=""}if(o!=null){o=t.formatter(t.formatString,o)}f=document.createElement("div");t._elems[w]=c(f);z=t._elems[w];z.addClass("jqplot-point-label jqplot-series-"+this.index+" jqplot-point-"+w);z.css("position","absolute");z.insertAfter(x.canvas);if(t.escapeHTML){z.text(o)}else{z.html(o)}var g=t.location;if((this.fillToZero&&D[w][1]<0)||(this.fillToZero&&this._type==="bar"&&this.barDirection==="horizontal"&&D[w][0]<0)||(this.waterfall&&parseInt(o,10))<0){g=b[d[g]]}var n=A.u2p(D[w][0])+t.xOffset(z,g);var h=q.u2p(D[w][1])+t.yOffset(z,g);if(this.renderer.constructor==c.jqplot.BarRenderer){if(this.barDirection=="vertical"){n+=this._barNudge}else{h-=this._barNudge}}z.css("left",n);z.css("top",h);var k=n+z.width();var s=h+z.height();var C=t.edgeTolerance;var e=c(x.canvas).position().left;var y=c(x.canvas).position().top;var B=x.canvas.width+e;var m=x.canvas.height+y;if(n-C<e||h-C<y||k+C>B||s+C>m){z.remove()}z=null;f=null}}};c.jqplot.postSeriesInitHooks.push(c.jqplot.PointLabels.init);c.jqplot.postDrawSeriesHooks.push(c.jqplot.PointLabels.draw)})(jQuery);