Вход Регистрация
Файл: templates/backend/default/assets/plugins/jquery-flot/jquery.flot.orderBars.min.js
Строк: 103
<?php
!function(e){function t(e){function t(e,t,o){var r=null;if(n(t)&&(c(t),i(e),a(e),l(t),g>=2)){var s=u(t),v=0,T=d();"undefined"==typeof y[t.bars.order]&&(y[t.bars.order]=h(s)?-1*f(m,s-1,Math.floor(g/2)-1)-T:f(m,Math.ceil(g/2),s-2)+T+2*b),v=y[t.bars.order],r=p(o,t,v),o.points=r}return r}function n(e){return null!=e.bars&&e.bars.show&&null!=e.bars.order}function i(e){var t=C?e.getPlaceholder().innerHeight():e.getPlaceholder().innerWidth(),n=C?o(e.getData(),1):o(e.getData(),0),i=n[1]-n[0];T=i/t}function o(e,t){for(var n=new Array,i=0;i<e.length;i++)n[0]=e[i].data[0][t],n[1]=e[i].data[e[i].data.length-1][t];return n}function a(e){m=r(e.getData()),g=m.length}function r(e){for(var t=new Array,n=[],i=0;i<e.length;i++)null!=e[i].bars.order&&e[i].bars.show&&n.indexOf(e[i].bars.order)<0&&(n.push(e[i].bars.order),t.push(e[i]));return t.sort(s)}function s(e,t){var n=e.bars.order,i=t.bars.order;return i>n?-1:n>i?1:0}function l(e){v="undefined"!=typeof e.bars.lineWidth?e.bars.lineWidth:2,b=v*T}function c(e){e.bars.horizontal&&(C=!0)}function u(e){for(var t=0,n=0;n<m.length;++n)if(e==m[n]){t=n;break}return t+1}function d(){var e=0;return 0!=g%2&&(e=m[Math.ceil(g/2)].bars.barWidth/2),e}function h(e){return e<=Math.ceil(g/2)}function f(e,t,n){for(var i=0,o=t;n>=o;o++)i+=e[o].bars.barWidth+2*b;return i}function p(e,t,n){for(var i=e.pointsize,o=e.points,a=0,r=C?1:0;r<o.length;r+=i)o[r]+=n,t.data[a][3]=o[r],a++;return o}var m,g,v,b,T=1,C=!1,y={};e.hooks.processDatapoints.push(t)}var n={series:{bars:{order:null}}};e.plot.plugins.push({init:t,options:n,name:"orderBars",version:"0.2"})}(jQuery);
?>
Онлайн: 0
Реклама