
template.js.flot.jquery.flot.image.min.js Maven / Gradle / Ivy
'use strict';(function(k){function x(e,m,g){e=e.getPlotOffset();if(g.images&&g.images.show)for(var f=g.datapoints.points,k=g.datapoints.pointsize,l=0;l=q.width||0>=q.height||(a>c&&(h=c,c=a,a=h),b>d&&(h=d,d=b,b=h),"center"===g.images.anchor&&(h=.5*(c-a)/(q.width-1),a-=h,c+=h,h=.5*(d-b)/(q.height-1),b-=h,d+=h),a===c||b===d||a>=n.max||c<=n.min||b>=p.max||d<=p.min))){var r=0,t=0,u=q.width,v=q.height;an.max&&(u+=(u-r)*(n.max-c)/(c-a),c=n.max);bp.max&&(t+=(t-v)*(p.max-d)/(d-b),d=p.max);a=n.p2c(a);c=n.p2c(c);b=p.p2c(b);d=p.p2c(d);a>c&&(h=c,c=a,a=h);b>d&&(h=d,d=b,b=h);h=m.globalAlpha;m.globalAlpha*=g.images.alpha;m.drawImage(q,r,t,u-r,v-t,a+e.left,b+e.top,c-a,d-b);m.globalAlpha=h}}}function y(e,k,g,f){k.images.show&&(f.format=[{required:!0},{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0},{x:!0,number:!0,required:!0},
{y:!0,number:!0,required:!0}])}k.plot.image={};k.plot.image.loadDataImages=function(e,m,g){var f=[],w=[],l=m.series.images.show;k.each(e,function(g,a){if(l||a.images.show)a.data&&(a=a.data),k.each(a,function(a,c){"string"===typeof c[0]&&(f.push(c[0]),w.push(c))})});k.plot.image.load(f,function(f){k.each(w,function(a,b){a=b[0];f[a]&&(b[0]=f[a])});g()})};k.plot.image.load=function(e,m){var g=e.length,f={};0===g&&m({});k.each(e,function(e,l){e=function(){--g;f[l]=this;0===g&&m(f)};k("\x3cimg /\x3e").load(e).error(e).attr("src",
l)})};k.plot.plugins.push({init:function(e){e.hooks.processRawData.push(y);e.hooks.drawSeries.push(x)},options:{series:{images:{show:!1,alpha:1,anchor:"corner"}}},name:"image",version:"1.1"})})(jQuery);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy