src/pyams_skin/resources/js/myams-graphs.min.js
changeset 0 bb4aabe07487
child 118 391ad752903e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_skin/resources/js/myams-graphs.min.js	Thu Feb 19 10:59:00 2015 +0100
@@ -0,0 +1,1 @@
+(function(a){MyAMS.graphs={init:function(b){MyAMS.ajax.check(a.fn.sparkline,MyAMS.baseURL+"ext/jquery-sparkline-2.1.1.min.js",function(c){b.each(function(){var f=a(this);var e=f.data();var d=e.sparklineType||"bar";switch(d){case"bar":f.sparkline("html",{type:"bar",barColor:e.sparklineBarColor||f.css("color")||"#0000f0",height:e.sparklineHeight||"26px",barWidth:e.sparklineBarwidth||5,barSpacing:e.sparklineBarspacing||2,stackedBarColor:f.data.sparklineBarstackedColor||["#A90329","#0099c6","#98AA56","#da532c","#4490B1","#6E9461","#990099","#B4CAD3"],negBarColor:f.data.sparklineNegbarColor||"#A90329",zeroAxis:"false"});break;case"line":f.sparkline("html",{type:"line",width:e.sparklineWidth||"90px",height:e.sparklineHeight||"20px",lineWidth:e.sparklineLineWidth||1,lineColor:e.sparklineLineColor||f.css("color")||"#0000f0",fillColor:e.fillColor||"#c0d0f0",spotColor:e.sparklineSpotColor||"#f08000",minSpotColor:e.sparklineMinspotColor||"#ed1c24",maxSpotColor:e.sparklineMaxspotColor||"#f08000",highlightSpotColor:e.sparklineHighlightspotColor||"#50f050",highlightLineColor:e.sparklineHighlightlineColor||"f02020",spotRadius:e.sparklineSpotradius||1.5,chartRangeMin:e.sparklineMinY||"undefined",chartRangeMax:e.sparklineMaxY||"undefined",chartRangeMinX:e.sparklineMinX||"undefined",chartRangeMaxX:e.sparklineMaxX||"undefined",normalRangeMin:e.minVal||"undefined",normalRangeMax:e.maxVal||"undefined",normalRangeColor:e.normColor||"#c0c0c0",drawNormalOnTop:e.drawNormal||false});break;case"pie":f.sparkline("html",{type:"pie",width:e.sparklinePiesize||90,height:e.sparklinePiesize||90,tooltipFormat:'<span style="color: {{color}}">&#9679;</span> ({{percent.1}}%)',sliceColors:e.sparklinePiecolor||["#B4CAD3","#4490B1","#98AA56","#da532c","#6E9461","#0099c6","#990099","#717D8A"],offset:0,borderWidth:1,offset:e.sparklineOffset||0,borderColor:e.borderColor||"#45494C"});break;case"box":f.sparkline("html",{type:"box",width:e.sparklineWidth||"auto",height:e.sparklineHeight||"auto",raw:e.sparklineBoxraw||false,target:e.sparklineTargetval||"undefined",minValue:e.sparklineMin||"undefined",maxValue:e.sparklineMax||"undefined",showOutliers:e.sparklineShowoutlier||true,outlierIQR:e.sparklineOutlierIqr||1.5,spotRadius:e.sparklineSpotradius||1.5,boxLineColor:f.css("color")||"#000000",boxFillColor:e.fillColor||"#c0d0f0",whiskerColor:e.sparklineWhisColor||"#000000",outlierLineColor:e.sparklineOutlineColor||"#303030",outlierFillColor:e.sparklineOutlinefillColor||"#f0f0f0",medianColor:e.sparklineOutlinemedianColor||"#f00000",targetColor:e.sparklineOutlinetargetColor||"#40a020"});break;case"bullet":f.sparkline("html",{type:"bullet",height:e.sparklineHeight||"auto",targetWidth:e.sparklineWidth||2,targetColor:e.sparklineBullet-color||"#ed1c24",performanceColor:e.sparklinePerformanceColor||"#3030f0",rangeColors:e.sparklineBulletrangeColor||["#d3dafe","#a8b6ff","#7f94ff"]});break;case"discrete":f.sparkline("html",{type:"discrete",width:e.sparklineWidth||50,height:e.sparklineHeight||26,lineColor:f.css("color"),lineHeight:e.sparklineLineHeight||5,thresholdValue:e.sparklineThreshold||"undefined",thresholdColor:e.sparklineThresholdColor||"#ed1c24"});break;case"tristate":f.sparkline("html",{type:"tristate",height:e.sparklineHeight||26,posBarColor:e.sparklinePosbarColor||"#60f060",negBarColor:e.sparklineNegbarColor||"#f04040",zeroBarColor:e.sparklineZerobarColor||"#909090",barWidth:e.sparklineBarwidth||5,barSpacing:e.sparklineBarspacing||2,zeroAxis:e.sparklineZeroaxis||false});break;case"compositebar":$this.sparkline(e.sparklineBarVal,{type:"bar",width:e.sparklineWidth||"100%",height:e.sparklineHeight||"20px",barColor:e.sparklineColorBottom||"#333333",barWidth:e.sparklineBarwidth||3});$this.sparkline(e.sparklineLineVal,{width:e.sparklineWidth||"100%",height:e.sparklineHeight||"20px",lineColor:e.sparklineColorTop||"#ed1c24",lineWidth:e.sparklineLineWidth||1,composite:true,fillColor:false});break;case"compositeline":$this.sparkline(e.sparklineBarVal,{type:"line",spotRadius:e.sparklineSpotradiusTop||1.5,spotColor:e.sparklineSpotColor||"#f08000",minSpotColor:e.sparklineMinspotColorTop||"#ed1c24",maxSpotColor:e.sparkline-maxspotColorTop||"#f08000",highlightSpotColor:e.sparklineHighlightspotColorTop||"#50f050",highlightLineColor:e.sparklineHighlightlineColorTop||"#f02020",valueSpots:e.sparklineBarValSpotsTop||null,lineWidth:e.sparklineLineWidthTop||1,width:e.sparklineWidth||"90px",height:e.sparklineHeight||"20px",lineColor:e.sparklineColorTop||"#333333",fillColor:e.sparklineFillcolorTop||"transparent"});$this.sparkline(e.sparklineLineVal,{type:"line",spotRadius:e.sparklineSpotradiusBottom||e.sparklineSpotradiusTop||1.5,spotColor:e.sparklineSpotColor||"#f08000",minSpotColor:e.sparklineMinspotColorBottom||e.sparklineMinspotColorTop||"#ed1c24",maxSpotColor:e.sparklineMaxspotColorBottom||e.sparklineMaxspotColorTop||"#f08000",highlightSpotColor:e.sparklineHighlightspotColorBottom||e.sparklineHighlightspotColorTop||"#50f050",highlightLineColor:e.sparklineHighlightlineColorBottom||e.sparklineHighlightlineColorTop||"#f02020",valueSpots:e.sparklineBarValSpotsBottom||null,lineWidth:e.sparklineLineWidthBottom||1,width:e.sparklineWidth||"90px",height:e.sparklineHeight||"20px",lineColor:e.sparklineColorBottom||"#ed1c24",composite:true,fillColor:e.sparklineFillcolorBottom||"transparent"});break}})})}}})(jQuery);
\ No newline at end of file