MINI
C:
/
siak
/
TOOL SIAK
/
siak73
/
app
/
Siak
/
bootstrap
/
v5
/
assets
/
plugins
/
flot
/
Upload File:
files >> C:/siak/TOOL SIAK/siak73/app/Siak/bootstrap/v5/assets/plugins/flot/jquery.flot.tickrotor.min.js
!function(t){function e(e){var a,i,h,s,l=[],o=!1;e.hooks.draw.push(function(e,r){var n;if(o){if(0==l.length)return;n=e.getAxes().xaxis;for(var c,M,g,f=n.box,d=0;d<l.length;d++)c=l[d],c.label&&(r.save(),r.font=a,90>=i?(M=-Math.ceil(Math.cos(s)*c.height),g=Math.ceil(Math.sin(s)*c.height),r.translate(Math.round(e.getPlotOffset().left+n.p2c(c.v))+M,f.top+f.padding+e.getOptions().grid.labelMargin+g),r.rotate(h)):(M=Math.ceil(Math.cos(s)*c.height)-Math.ceil(Math.cos(s)*c.width),g=Math.ceil(Math.sin(s)*c.width)+Math.ceil(Math.sin(s)*c.height),r.translate(Math.round(e.getPlotOffset().left+n.p2c(c.v)+M),f.top+f.padding+e.getOptions().grid.labelMargin+g),r.rotate(-s)),r.fillText(c.label,0,0),r.restore())}else{var p=e.getAxes().xaxis.options;if(void 0===p.rotateTicks)return;if(i=parseInt(p.rotateTicks,10),i.toString()!=p.rotateTicks||0==i||i>=180)return;h=i*Math.PI/180,s=i>90?Math.PI-h:Math.PI/2-h,a=p.rotateTicksFont,a||(a=t(".tickLabel").css("font")),a||(a="smaller sans-serif");var v,u=0,x=0,b=0,k=0;n=e.getAxes().xaxis,l=e.getAxes().xaxis.ticks,n.rotatedTicks=l,p.ticks=[];for(var P,d=0;d<l.length;d++){v=t('<span style="font:'+a+'">'+l[d].label+"</span>"),e.getPlaceholder().append(v),l[d].height=v.outerHeight(!0),l[d].width=v.outerWidth(!0),v.remove(),l[d].height>x&&(x=l[d].height),l[d].width>u&&(u=l[d].width);var c=l[d];i>90?(P=Math.round(e.getPlotOffset().left+n.p2c(c.v))-Math.ceil(Math.cos(s)*c.height)-Math.ceil(Math.cos(s)*c.width),b>P&&(b=P)):(P=Math.round(e.getPlotOffset().left+n.p2c(c.v))+Math.ceil(Math.cos(s)*c.height)+Math.ceil(Math.cos(s)*c.width),P>k&&(k=P))}if(i>90){var w=h-Math.PI/2;p.labelHeight=Math.ceil(Math.sin(w)*u)+Math.ceil(Math.sin(w)*x)}else{var w=Math.PI/2-h;p.labelHeight=Math.ceil(Math.sin(h)*u)+Math.ceil(Math.sin(w)*x)}0>b&&(e.getAxes().yaxis.options.labelWidth=-1*b),o=!0,e.setupGrid(),e.draw()}})}var a={};t.plot.plugins.push({init:e,options:a,name:"tickRotor",version:"1.0"})}(jQuery);
Copyright ©2021 || Defacer Indonesia