From 10b8c0df026cebfb2433ff8d3e68df662b936963 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 14 Nov 2011 14:52:39 +0100 Subject: delete some unused js files --- application/layouts/default.phtml | 4 - public/media/js/jqplot.cursor.min.js | 30 -- public/media/js/jqplot.donutRenderer.min.js | 30 -- public/media/js/jqplot.highlighter.min.js | 30 -- public/media/js/jqplot.pieRenderer.lineLabels.js | 404 ----------------------- 5 files changed, 498 deletions(-) delete mode 100755 public/media/js/jqplot.cursor.min.js delete mode 100755 public/media/js/jqplot.donutRenderer.min.js delete mode 100755 public/media/js/jqplot.highlighter.min.js delete mode 100755 public/media/js/jqplot.pieRenderer.lineLabels.js diff --git a/application/layouts/default.phtml b/application/layouts/default.phtml index 3921210..f0b2e20 100755 --- a/application/layouts/default.phtml +++ b/application/layouts/default.phtml @@ -31,10 +31,6 @@ echo $this->headScript()."\n"; src='/media/js/jqplot.categoryAxisRenderer.min.js'> - - - diff --git a/public/media/js/jqplot.cursor.min.js b/public/media/js/jqplot.cursor.min.js deleted file mode 100755 index c79f727..0000000 --- a/public/media/js/jqplot.cursor.min.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * jqPlot - * Pure JavaScript plotting plugin using jQuery - * - * Version: 1.0.0b2_r792 - * - * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. - * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: - * chris at jqplot dot com or see http://www.jqplot.com/info.php . - * - * If you are feeling kind and generous, consider supporting the project by - * making a donation at: http://www.jqplot.com/donate.php . - * - * sprintf functions contained in jqplot.sprintf.js by Ash Searle: - * - * version 2007.04.27 - * author Ash Searle - * http://hexmen.com/blog/2007/03/printf-sprintf/ - * http://hexmen.com/js/sprintf.js - * The author (Ash Searle) has placed this code in the public domain: - * "This code is unrestricted: you are free to use it however you like." - * - */ -(function(j){j.jqplot.Cursor=function(q){this.style="crosshair";this.previousCursor="auto";this.show=j.jqplot.config.enablePlugins;this.showTooltip=true;this.followMouse=false;this.tooltipLocation="se";this.tooltipOffset=6;this.showTooltipGridPosition=false;this.showTooltipUnitPosition=true;this.showTooltipDataPosition=false;this.tooltipFormatString="%.4P, %.4P";this.useAxesFormatters=true;this.tooltipAxisGroups=[];this.zoom=false;this.zoomProxy=false;this.zoomTarget=false;this.looseZoom=false;this.clickReset=false;this.dblClickReset=true;this.showVerticalLine=false;this.showHorizontalLine=false;this.constrainZoomTo="none";this.shapeRenderer=new j.jqplot.ShapeRenderer();this._zoom={start:[],end:[],started:false,zooming:false,isZoomed:false,axes:{start:{},end:{}},gridpos:{},datapos:{}};this._tooltipElem;this.zoomCanvas;this.cursorCanvas;this.intersectionThreshold=2;this.showCursorLegend=false;this.cursorLegendFormatString=j.jqplot.Cursor.cursorLegendFormatString;this._oldHandlers={onselectstart:null,ondrag:null,onmousedown:null};this.constrainOutsideZoom=true;this.showTooltipOutsideZoom=false;this.onGrid=false;j.extend(true,this,q)};j.jqplot.Cursor.cursorLegendFormatString="%s x:%s, y:%s";j.jqplot.Cursor.init=function(t,s,r){var q=r||{};this.plugins.cursor=new j.jqplot.Cursor(q.cursor);var u=this.plugins.cursor;if(u.show){j.jqplot.eventListenerHooks.push(["jqplotMouseEnter",b]);j.jqplot.eventListenerHooks.push(["jqplotMouseLeave",f]);j.jqplot.eventListenerHooks.push(["jqplotMouseMove",i]);if(u.showCursorLegend){r.legend=r.legend||{};r.legend.renderer=j.jqplot.CursorLegendRenderer;r.legend.formatString=this.plugins.cursor.cursorLegendFormatString;r.legend.show=true}if(u.zoom){j.jqplot.eventListenerHooks.push(["jqplotMouseDown",a]);if(u.clickReset){j.jqplot.eventListenerHooks.push(["jqplotClick",k])}if(u.dblClickReset){j.jqplot.eventListenerHooks.push(["jqplotDblClick",c])}}this.resetZoom=function(){var x=this.axes;if(!u.zoomProxy){for(var w in x){x[w].reset();x[w]._ticks=[];x[w]._autoFormatString=u._zoom.axes[w].tickFormatString}this.redraw()}else{var v=this.plugins.cursor.zoomCanvas._ctx;v.clearRect(0,0,v.canvas.width,v.canvas.height);v=null}this.plugins.cursor._zoom.isZoomed=false;this.target.trigger("jqplotResetZoom",[this,this.plugins.cursor])};if(u.showTooltipDataPosition){u.showTooltipUnitPosition=false;u.showTooltipGridPosition=false;if(q.cursor.tooltipFormatString==undefined){u.tooltipFormatString=j.jqplot.Cursor.cursorLegendFormatString}}}};j.jqplot.Cursor.postDraw=function(){var x=this.plugins.cursor;if(x.zoomCanvas){x.zoomCanvas.resetCanvas();x.zoomCanvas=null}if(x.cursorCanvas){x.cursorCanvas.resetCanvas();x.cursorCanvas=null}if(x._tooltipElem){x._tooltipElem.emptyForce();x._tooltipElem=null}if(x.zoom){x.zoomCanvas=new j.jqplot.GenericCanvas();this.eventCanvas._elem.before(x.zoomCanvas.createElement(this._gridPadding,"jqplot-zoom-canvas",this._plotDimensions,this));x.zoomCanvas.setContext()}var v=document.createElement("div");x._tooltipElem=j(v);v=null;x._tooltipElem.addClass("jqplot-cursor-tooltip");x._tooltipElem.css({position:"absolute",display:"none"});if(x.zoomCanvas){x.zoomCanvas._elem.before(x._tooltipElem)}else{this.eventCanvas._elem.before(x._tooltipElem)}if(x.showVerticalLine||x.showHorizontalLine){x.cursorCanvas=new j.jqplot.GenericCanvas();this.eventCanvas._elem.before(x.cursorCanvas.createElement(this._gridPadding,"jqplot-cursor-canvas",this._plotDimensions,this));x.cursorCanvas.setContext()}if(x.showTooltipUnitPosition){if(x.tooltipAxisGroups.length===0){var t=this.series;var u;var q=[];for(var r=0;r6&&Math.abs(F.y-G._zoom.start[1])>6)||(G.constrainZoomTo=="x"&&Math.abs(F.x-G._zoom.start[0])>6)||(G.constrainZoomTo=="y"&&Math.abs(F.y-G._zoom.start[1])>6)){if(!B.plugins.cursor.zoomProxy){for(var x in s){if(G._zoom.axes[x]==undefined){G._zoom.axes[x]={};G._zoom.axes[x].numberTicks=E[x].numberTicks;G._zoom.axes[x].tickInterval=E[x].tickInterval;G._zoom.axes[x].daTickInterval=E[x].daTickInterval;G._zoom.axes[x].min=E[x].min;G._zoom.axes[x].max=E[x].max;G._zoom.axes[x].tickFormatString=(E[x].tickOptions!=null)?E[x].tickOptions.formatString:""}if((G.constrainZoomTo=="none")||(G.constrainZoomTo=="x"&&x.charAt(0)=="x")||(G.constrainZoomTo=="y"&&x.charAt(0)=="y")){y=s[x];if(y!=null){var u,w;if(y>v[x]){u=v[x];w=y}else{C=v[x]-y;u=y;w=v[x]}if(this.looseZoom&&(E[x].renderer.constructor===j.jqplot.LinearAxisRenderer||E[x].renderer.constructor===j.jqplot.DateAxisRenderer)){var H=j.jqplot.LinearTickGenerator(u,w);E[x].min=H[0];E[x].max=H[1];E[x]._autoFormatString=H[3];E[x].numberTicks=H[2];E[x].tickInterval=H[4];E[x].daTickInterval=[H[4]/1000,"seconds"]}else{E[x].min=u;E[x].max=w;E[x].tickInterval=null;E[x].daTickInterval=null}E[x]._ticks=[]}}}z.clearRect(0,0,z.canvas.width,z.canvas.height);B.redraw();G._zoom.isZoomed=true;z=null}B.target.trigger("jqplotZoom",[F,s,B,t])}};j.jqplot.preInitHooks.push(j.jqplot.Cursor.init);j.jqplot.postDrawHooks.push(j.jqplot.Cursor.postDraw);function e(E,r,B){var G=B.plugins.cursor;var w="";var K=false;if(G.showTooltipGridPosition){w=E.x+", "+E.y;K=true}if(G.showTooltipUnitPosition){var D;for(var C=0;C"}if(G.useAxesFormatters){var A=B.axes[D[0]]._ticks[0].formatter;var q=B.axes[D[1]]._ticks[0].formatter;var H=B.axes[D[0]]._ticks[0].formatString;var v=B.axes[D[1]]._ticks[0].formatString;w+=A(H,r[D[0]])+", "+q(v,r[D[1]])}else{w+=j.jqplot.sprintf(G.tooltipFormatString,r[D[0]],r[D[1]])}K=true}}if(G.showTooltipDataPosition){var u=B.series;var J=d(B,E.x,E.y);var K=false;for(var C=0;C"}w+=j.jqplot.sprintf(G.tooltipFormatString,t,z,x);K=true}}}}G._tooltipElem.html(w)}function g(C,A){var E=A.plugins.cursor;var z=E.cursorCanvas._ctx;z.clearRect(0,0,z.canvas.width,z.canvas.height);if(E.showVerticalLine){E.shapeRenderer.draw(z,[[C.x,0],[C.x,z.canvas.height]])}if(E.showHorizontalLine){E.shapeRenderer.draw(z,[[0,C.y],[z.canvas.width,C.y]])}var G=d(A,C.x,C.y);if(E.showCursorLegend){var r=j(A.targetId+" td.jqplot-cursor-legend-label");for(var B=0;B0;r--){s=v[r-1];if(q[s].show){u[s]=q[s].series_p2u(w[s.charAt(0)])}}return{offsets:t,gridPos:w,dataPos:u}}function h(z){var x=z.data.plot;var y=x.plugins.cursor;if(y.show&&y.zoom&&y._zoom.started&&!y.zoomTarget){var B=y.zoomCanvas._ctx;var v=o(z);var w=v.gridPos;var t=v.dataPos;y._zoom.gridpos=w;y._zoom.datapos=t;y._zoom.zooming=true;var u=w.x;var s=w.y;var A=B.canvas.height;var q=B.canvas.width;if(y.showTooltip&&!y.onGrid&&y.showTooltipOutsideZoom){e(w,t,x);if(y.followMouse){n(w,x)}}if(y.constrainZoomTo=="x"){y._zoom.end=[u,A]}else{if(y.constrainZoomTo=="y"){y._zoom.end=[q,s]}else{y._zoom.end=[u,s]}}var r=window.getSelection;if(document.selection&&document.selection.empty){document.selection.empty()}else{if(r&&!r().isCollapsed){r().collapse()}}l.call(y);B=null}}function a(w,s,r,x,t){var v=t.plugins.cursor;j(document).one("mouseup.jqplot_cursor",{plot:t},p);var u=t.axes;if(document.onselectstart!=undefined){v._oldHandlers.onselectstart=document.onselectstart;document.onselectstart=function(){return false}}if(document.ondrag!=undefined){v._oldHandlers.ondrag=document.ondrag;document.ondrag=function(){return false}}if(document.onmousedown!=undefined){v._oldHandlers.onmousedown=document.onmousedown;document.onmousedown=function(){return false}}if(v.zoom){if(!v.zoomProxy){var y=v.zoomCanvas._ctx;y.clearRect(0,0,y.canvas.width,y.canvas.height);y=null}if(v.constrainZoomTo=="x"){v._zoom.start=[s.x,0]}else{if(v.constrainZoomTo=="y"){v._zoom.start=[0,s.y]}else{v._zoom.start=[s.x,s.y]}}v._zoom.started=true;for(var q in r){v._zoom.axes.start[q]=r[q]}j(document).bind("mousemove.jqplotCursor",{plot:t},h)}}function p(y){var v=y.data.plot;var x=v.plugins.cursor;if(x.zoom&&x._zoom.zooming&&!x.zoomTarget){var u=x._zoom.gridpos.x;var r=x._zoom.gridpos.y;var t=x._zoom.datapos;var z=x.zoomCanvas._ctx.canvas.height;var q=x.zoomCanvas._ctx.canvas.width;var w=v.axes;if(x.constrainOutsideZoom&&!x.onGrid){if(u<0){u=0}else{if(u>q){u=q}}if(r<0){r=0}else{if(r>z){r=z}}for(var s in t){if(t[s]){if(s.charAt(0)=="x"){t[s]=w[s].series_p2u(u)}else{t[s]=w[s].series_p2u(r)}}}}if(x.constrainZoomTo=="x"){r=z}else{if(x.constrainZoomTo=="y"){u=q}}x._zoom.end=[u,r];x._zoom.gridpos={x:u,y:r};x.doZoom(x._zoom.gridpos,t,v,x)}x._zoom.started=false;x._zoom.zooming=false;j(document).unbind("mousemove.jqplotCursor",h);if(document.onselectstart!=undefined&&x._oldHandlers.onselectstart!=null){document.onselectstart=x._oldHandlers.onselectstart;x._oldHandlers.onselectstart=null}if(document.ondrag!=undefined&&x._oldHandlers.ondrag!=null){document.ondrag=x._oldHandlers.ondrag;x._oldHandlers.ondrag=null}if(document.onmousedown!=undefined&&x._oldHandlers.onmousedown!=null){document.onmousedown=x._oldHandlers.onmousedown;x._oldHandlers.onmousedown=null}}function l(){var y=this._zoom.start;var u=this._zoom.end;var s=this.zoomCanvas._ctx;var r,v,x,q;if(u[0]>y[0]){r=y[0];q=u[0]-y[0]}else{r=u[0];q=y[0]-u[0]}if(u[1]>y[1]){v=y[1];x=u[1]-y[1]}else{v=u[1];x=y[1]-u[1]}s.fillStyle="rgba(0,0,0,0.2)";s.strokeStyle="#999999";s.lineWidth=1;s.clearRect(0,0,s.canvas.width,s.canvas.height);s.fillRect(0,0,s.canvas.width,s.canvas.height);s.clearRect(r,v,q,x);s.strokeRect(r,v,q,x);s=null}j.jqplot.CursorLegendRenderer=function(q){j.jqplot.TableLegendRenderer.call(this,q);this.formatString="%s"};j.jqplot.CursorLegendRenderer.prototype=new j.jqplot.TableLegendRenderer();j.jqplot.CursorLegendRenderer.prototype.constructor=j.jqplot.CursorLegendRenderer;j.jqplot.CursorLegendRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}if(this.show){var w=this._series,A;var r=document.createElement("div");this._elem=j(r);r=null;this._elem.addClass("jqplot-legend jqplot-cursor-legend");this._elem.css("position","absolute");var q=false;for(var x=0;x').appendTo(this._elem);E.data("seriesIndex",s);j('
').appendTo(E);var G=j('');G.appendTo(E);G.data("seriesIndex",s);if(this.escapeHtml){G.text(D)}else{G.html(D)}E=null;G=null}return this._elem}})(jQuery); \ No newline at end of file diff --git a/public/media/js/jqplot.donutRenderer.min.js b/public/media/js/jqplot.donutRenderer.min.js deleted file mode 100755 index c9095f1..0000000 --- a/public/media/js/jqplot.donutRenderer.min.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * jqPlot - * Pure JavaScript plotting plugin using jQuery - * - * Version: 1.0.0b2_r792 - * - * Copyright (c) 2009-2011 Chris Leonello - * jqPlot is currently available for use in all personal or commercial projects - * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL - * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can - * choose the license that best suits your project and use it accordingly. - * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: - * chris at jqplot dot com or see http://www.jqplot.com/info.php . - * - * If you are feeling kind and generous, consider supporting the project by - * making a donation at: http://www.jqplot.com/donate.php . - * - * sprintf functions contained in jqplot.sprintf.js by Ash Searle: - * - * version 2007.04.27 - * author Ash Searle - * http://hexmen.com/blog/2007/03/printf-sprintf/ - * http://hexmen.com/js/sprintf.js - * The author (Ash Searle) has placed this code in the public domain: - * "This code is unrestricted: you are free to use it however you like." - * - */ -(function(e){e.jqplot.DonutRenderer=function(){e.jqplot.LineRenderer.call(this)};e.jqplot.DonutRenderer.prototype=new e.jqplot.LineRenderer();e.jqplot.DonutRenderer.prototype.constructor=e.jqplot.DonutRenderer;e.jqplot.DonutRenderer.prototype.init=function(p,t){this.diameter=null;this.innerDiameter=null;this.thickness=null;this.padding=20;this.sliceMargin=0;this.ringMargin=null;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.4;this.dataLabelNudge=0;this.startAngle=0;this.tickRenderer=e.jqplot.DonutTickRenderer;this._drawData=true;this._type="donut";if(p.highlightMouseDown&&p.highlightMouseOver==null){p.highlightMouseOver=false}e.extend(true,this,p);if(this.diameter!=null){this.diameter=this.diameter-this.sliceMargin}this._diameter=null;this._innerDiameter=null;this._radius=null;this._innerRadius=null;this._thickness=null;this._previousSeries=[];this._numberSeries=1;this._sliceAngles=[];this._highlightedPoint=null;if(this.highlightColors.length==0){for(var r=0;r570)?n[o]*0.8:n[o]+0.3*(255-n[o]);n[o]=parseInt(n[o],10)}this.highlightColors.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}}t.postParseOptionsHooks.addOnce(l);t.postInitHooks.addOnce(g);t.eventListenerHooks.addOnce("jqplotMouseMove",b);t.eventListenerHooks.addOnce("jqplotMouseDown",a);t.eventListenerHooks.addOnce("jqplotMouseUp",j);t.eventListenerHooks.addOnce("jqplotClick",f);t.eventListenerHooks.addOnce("jqplotRightClick",m);t.postDrawHooks.addOnce(h)};e.jqplot.DonutRenderer.prototype.setGridData=function(s){var o=[];var t=[];var n=this.startAngle/180*Math.PI;var r=0;this._drawData=false;for(var q=0;q0){o[q]+=o[q-1]}r+=this.data[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q0){o[q]+=o[q-1]}r+=s[q][1]}var p=Math.PI*2/o[o.length-1];for(var q=0;q6.282+this.startAngle){t=6.282+this.startAngle;if(u>t){u=6.281+this.startAngle}}if(u>=t){return}x.beginPath();x.fillStyle=p;x.strokeStyle=p;x.arc(0,0,n,u,t,false);x.lineTo(v*Math.cos(t),v*Math.sin(t));x.arc(0,0,v,t,u,true);x.closePath();if(w){x.fill()}else{x.stroke()}}if(s){for(var q=0;q1&&this.index>0)?this._previousSeries[0]._diameter:this._diameter;this._thickness=this.thickness||(M-this.innerDiameter-2*X*this._numberSeries)/this._numberSeries/2}else{this._thickness=this.thickness||v/2/(this._numberSeries+1)*0.85}var K=this._radius=this._diameter/2;this._innerRadius=this._radius-this._thickness;var o=this.startAngle/180*Math.PI;this._center=[(s-u*q)/2+u*q,(H-u*p)/2+u*p];if(this.shadow){var L="rgba(0,0,0,"+this.shadowAlpha+")";for(var Q=0;Q=this.dataLabelThreshold){var S,U=(A+z)/2,C;if(this.dataLabels=="label"){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,V[Q][0])}else{if(this.dataLabels=="value"){S=this.dataLabelFormatString||"%d";C=e.jqplot.sprintf(S,this.data[Q][1])}else{if(this.dataLabels=="percent"){S=this.dataLabelFormatString||"%d%%";C=e.jqplot.sprintf(S,V[Q][2]*100)}else{if(this.dataLabels.constructor==Array){S=this.dataLabelFormatString||"%s";C=e.jqplot.sprintf(S,this.dataLabels[Q])}}}}var n=this._innerRadius+this._thickness*this.dataLabelPositionFactor+this.sliceMargin+this.dataLabelNudge;var F=this._center[0]+Math.cos(U)*n+this.canvas._offsets.left;var E=this._center[1]+Math.sin(U)*n+this.canvas._offsets.top;var D=e(''+C+"").insertBefore(P.eventCanvas._elem);F-=D.width()/2;E-=D.height()/2;F=Math.round(F);E=Math.round(E);D.css({left:F,top:E})}}};e.jqplot.DonutAxisRenderer=function(){e.jqplot.LinearAxisRenderer.call(this)};e.jqplot.DonutAxisRenderer.prototype=new e.jqplot.LinearAxisRenderer();e.jqplot.DonutAxisRenderer.prototype.constructor=e.jqplot.DonutAxisRenderer;e.jqplot.DonutAxisRenderer.prototype.init=function(n){this.tickRenderer=e.jqplot.DonutTickRenderer;e.extend(true,this,n);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.DonutLegendRenderer=function(){e.jqplot.TableLegendRenderer.call(this)};e.jqplot.DonutLegendRenderer.prototype=new e.jqplot.TableLegendRenderer();e.jqplot.DonutLegendRenderer.prototype.constructor=e.jqplot.DonutLegendRenderer;e.jqplot.DonutLegendRenderer.prototype.init=function(n){this.numberRows=null;this.numberColumns=null;e.extend(true,this,n)};e.jqplot.DonutLegendRenderer.prototype.draw=function(){var q=this;if(this.show){var y=this._series;var B="position:absolute;";B+=(this.background)?"background:"+this.background+";":"";B+=(this.border)?"border:"+this.border+";":"";B+=(this.fontSize)?"font-size:"+this.fontSize+";":"";B+=(this.fontFamily)?"font-family:"+this.fontFamily+";":"";B+=(this.textColor)?"color:"+this.textColor+";":"";B+=(this.marginTop!=null)?"margin-top:"+this.marginTop+";":"";B+=(this.marginBottom!=null)?"margin-bottom:"+this.marginBottom+";":"";B+=(this.marginLeft!=null)?"margin-left:"+this.marginLeft+";":"";B+=(this.marginRight!=null)?"margin-right:"+this.marginRight+";":"";this._elem=e('
');var F=false,x=false,n,v;var z=y[0];var o=new e.jqplot.ColorGenerator(z.seriesColors);if(z.show){var G=z.data;if(this.numberRows){n=this.numberRows;if(!this.numberColumns){v=Math.ceil(G.length/n)}else{v=this.numberColumns}}else{if(this.numberColumns){v=this.numberColumns;n=Math.ceil(G.length/this.numberColumns)}else{n=G.length;v=1}}var E,D,p,t,r,u,w,C;var A=0;for(E=0;E').prependTo(this._elem)}else{p=e('').appendTo(this._elem)}for(D=0;D0){F=true}else{F=false}}else{if(E==n-1){F=false}else{F=true}}w=(F)?this.rowSpacing:"0";t=e('
');r=e('');if(this.escapeHtml){r.text(u)}else{r.html(u)}if(x){r.prependTo(p);t.prependTo(p)}else{t.appendTo(p);r.appendTo(p)}F=true}A++}}}}return this._elem};function c(r,q,o){o=o||{};o.axesDefaults=o.axesDefaults||{};o.legend=o.legend||{};o.seriesDefaults=o.seriesDefaults||{};var n=false;if(o.seriesDefaults.renderer==e.jqplot.DonutRenderer){n=true}else{if(o.series){for(var p=0;p=0.6)?l[3]*0.6:l[3]*(2-l[3]);i.color="rgba("+n[0]+","+n[1]+","+n[2]+","+k+")";i.init();i.draw(p.gridData[o.pointIndex][0],p.gridData[o.pointIndex][1],j.highlightCanvas._ctx)}function g(w,q,m){var k=w.plugins.highlighter;var B=k._tooltipElem;if(k.useAxesFormatters){var u=q._xaxis._ticks[0].formatter;var h=q._yaxis._ticks[0].formatter;var C=q._xaxis._ticks[0].formatString;var r=q._yaxis._ticks[0].formatString;var v;var s=u(C,m.data[0]);var l=[];for(var z=1;z0) { - stack[i] += stack[i-1]; - } - } - var fact = Math.PI*2/stack[stack.length - 1]; - - for (var i=0; i 6.282) { - ang2 = 6.282; - if (ang1 > ang2) { - ang1 = 6.281; - } - } - ctx.beginPath(); - ctx.moveTo(0, 0); - ctx.fillStyle = color; - ctx.strokeStyle = color; - ctx.lineWidth = lineWidth; - ctx.arc(0, 0, r, ang1, ang2, false); - ctx.closePath(); - if (fill) { - ctx.fill(); - } - else { - ctx.stroke(); - } - } - - if (isShadow) { - for (var i=0; i= 4.712 || mid_ang <= 1.57) ? 6 : -6; - var line2_end_x = line1_end_x + line2_end_x_offset; - var line2_end_y = line1_end_y; - ctx.lineTo(line2_end_x, line2_end_y); - - ctx.stroke(); - ctx.closePath(); - - // label - var l = $("
"+gd[i][0]+" "+percentage+"%
").insertAfter(ctx.canvas); - var l_x_offset = (mid_ang >= 4.712 || mid_ang <= 1.57) ? 4 : -1 * l.width() - 4; - var l_y_offset = -1 * l.height() / 2; - var l_x = line2_end_x + origin.x + l_x_offset; - var l_y = line2_end_y + origin.y + l_y_offset; - l.css({left: l_x+"px", top: l_y+"px"}); - - // console.log(gd[i][0]+':'); - // console.log(' mid_ang: '+mid_ang); - // console.log(' l_x_offset: '+l_x_offset); - // console.log(' l_y_offset: '+l_y_offset); - // console.log(' l_x: '+l_x); - // console.log(' l_y: '+l_y); - // console.log(' line1_start_x: '+line1_start_x); - // console.log(' line1_start_y: '+line1_start_y); - // console.log(' line1_end_x: '+line1_end_x); - // console.log(' line1_end_y: '+line1_end_y); - // console.log(' line2_end_x_offset: '+line2_end_x_offset); - // console.log(' line2_end_x: '+line2_end_x); - // console.log(' line2_end_y: '+line2_end_y); - } - } - - ctx.restore(); - }; - - $.jqplot.PieAxisRenderer = function() { - $.jqplot.LinearAxisRenderer.call(this); - }; - - $.jqplot.PieAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); - $.jqplot.PieAxisRenderer.prototype.constructor = $.jqplot.PieAxisRenderer; - - - // There are no traditional axes on a pie chart. We just need to provide - // dummy objects with properties so the plot will render. - // called with scope of axis object. - $.jqplot.PieAxisRenderer.prototype.init = function(options){ - // - this.tickRenderer = $.jqplot.PieTickRenderer; - $.extend(true, this, options); - // I don't think I'm going to need _dataBounds here. - // have to go Axis scaling in a way to fit chart onto plot area - // and provide u2p and p2u functionality for mouse cursor, etc. - // for convienence set _dataBounds to 0 and 100 and - // set min/max to 0 and 100. - this._dataBounds = {min:0, max:100}; - this.min = 0; - this.max = 100; - this.showTicks = false; - this.ticks = []; - this.showMark = false; - this.show = false; - }; - - $.jqplot.PieLegendRenderer = function() { - $.jqplot.TableLegendRenderer.call(this); - }; - - $.jqplot.PieLegendRenderer.prototype = new $.jqplot.TableLegendRenderer(); - $.jqplot.PieLegendRenderer.prototype.constructor = $.jqplot.PieLegendRenderer; - - // called with context of legend - $.jqplot.PieLegendRenderer.prototype.draw = function() { - var legend = this; - if (this.show) { - var series = this._series; - // make a table. one line label per row. - var ss = 'position:absolute;'; - ss += (this.background) ? 'background:'+this.background+';' : ''; - ss += (this.border) ? 'border:'+this.border+';' : ''; - ss += (this.fontSize) ? 'font-size:'+this.fontSize+';' : ''; - ss += (this.fontFamily) ? 'font-family:'+this.fontFamily+';' : ''; - ss += (this.textColor) ? 'color:'+this.textColor+';' : ''; - this._elem = $('
'); - - var pad = false; - var s = series[0]; - var colorGenerator = new s.colorGenerator(s.seriesColors); - if (s.show) { - var pd = s.data; - for (var i=0; i