lazy_high_charts 1.5.8 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/GEM_VERSION +1 -1
- data/README.md +10 -5
- data/lib/lazy_high_charts/layout_helper.rb +2 -4
- data/lib/tasks/high_charts.rake +2 -0
- data/spec/lazy_high_charts_spec.rb +1 -5
- metadata +8 -34
- data/vendor/assets/javascripts/highcharts/adapters/mootools-adapter.js +0 -13
- data/vendor/assets/javascripts/highcharts/adapters/prototype-adapter.js +0 -15
- data/vendor/assets/javascripts/highcharts/highcharts-more.js +0 -60
- data/vendor/assets/javascripts/highcharts/highcharts.js +0 -382
- data/vendor/assets/javascripts/highcharts/highstock.js +0 -431
- data/vendor/assets/javascripts/highcharts/modules/accessibility.js +0 -46
- data/vendor/assets/javascripts/highcharts/modules/annotations.js +0 -14
- data/vendor/assets/javascripts/highcharts/modules/boost.js +0 -22
- data/vendor/assets/javascripts/highcharts/modules/broken-axis.js +0 -14
- data/vendor/assets/javascripts/highcharts/modules/canvas-tools.js +0 -133
- data/vendor/assets/javascripts/highcharts/modules/data.js +0 -26
- data/vendor/assets/javascripts/highcharts/modules/drilldown.js +0 -26
- data/vendor/assets/javascripts/highcharts/modules/exporting.js +0 -26
- data/vendor/assets/javascripts/highcharts/modules/funnel.js +0 -12
- data/vendor/assets/javascripts/highcharts/modules/heatmap.js +0 -25
- data/vendor/assets/javascripts/highcharts/modules/no-data-to-display.js +0 -12
- data/vendor/assets/javascripts/highcharts/modules/offline-exporting.js +0 -18
- data/vendor/assets/javascripts/highcharts/modules/solid-gauge.js +0 -14
- data/vendor/assets/javascripts/highcharts/modules/treemap.js +0 -31
- data/vendor/assets/javascripts/highcharts/stock/adapters/mootools-adapter.js +0 -13
- data/vendor/assets/javascripts/highcharts/stock/adapters/prototype-adapter.js +0 -15
- data/vendor/assets/javascripts/highcharts/stock/highcharts-more.js +0 -60
- data/vendor/assets/javascripts/highcharts/stock/modules/drilldown.js +0 -26
- data/vendor/assets/javascripts/highcharts/stock/modules/exporting.js +0 -26
- data/vendor/assets/javascripts/highcharts/stock/modules/solid-gauge.js +0 -14
@@ -1,26 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Highcharts JS v5.0.5 (2016-11-29)
|
3
|
-
Highcharts Drilldown module
|
4
|
-
|
5
|
-
Author: Torstein Honsi
|
6
|
-
License: www.highcharts.com/license
|
7
|
-
|
8
|
-
*/
|
9
|
-
(function(n){"object"===typeof module&&module.exports?module.exports=n:n(Highcharts)})(function(n){(function(f){function n(b,a,d){var c;a.rgba.length&&b.rgba.length?(b=b.rgba,a=a.rgba,c=1!==a[3]||1!==b[3],b=(c?"rgba(":"rgb(")+Math.round(a[0]+(b[0]-a[0])*(1-d))+","+Math.round(a[1]+(b[1]-a[1])*(1-d))+","+Math.round(a[2]+(b[2]-a[2])*(1-d))+(c?","+(a[3]+(b[3]-a[3])*(1-d)):"")+")"):b=a.input||"none";return b}var B=f.noop,v=f.color,w=f.defaultOptions,l=f.each,p=f.extend,H=f.format,C=f.pick,x=f.wrap,q=f.Chart,
|
10
|
-
t=f.seriesTypes,D=t.pie,r=t.column,E=f.Tick,y=f.fireEvent,F=f.inArray,G=1;l(["fill","stroke"],function(b){f.Fx.prototype[b+"Setter"]=function(){this.elem.attr(b,n(v(this.start),v(this.end),this.pos),null,!0)}});p(w.lang,{drillUpText:"\u25c1 Back to {series.name}"});w.drilldown={activeAxisLabelStyle:{cursor:"pointer",color:"#003399",fontWeight:"bold",textDecoration:"underline"},activeDataLabelStyle:{cursor:"pointer",color:"#003399",fontWeight:"bold",textDecoration:"underline"},animation:{duration:500},
|
11
|
-
drillUpButton:{position:{align:"right",x:-10,y:10}}};f.SVGRenderer.prototype.Element.prototype.fadeIn=function(b){this.attr({opacity:.1,visibility:"inherit"}).animate({opacity:C(this.newOpacity,1)},b||{duration:250})};q.prototype.addSeriesAsDrilldown=function(b,a){this.addSingleSeriesAsDrilldown(b,a);this.applyDrilldown()};q.prototype.addSingleSeriesAsDrilldown=function(b,a){var d=b.series,c=d.xAxis,e=d.yAxis,h,g=[],k=[],u,m,z;z={color:b.color||d.color};this.drilldownLevels||(this.drilldownLevels=
|
12
|
-
[]);u=d.options._levelNumber||0;(m=this.drilldownLevels[this.drilldownLevels.length-1])&&m.levelNumber!==u&&(m=void 0);a=p(p({_ddSeriesId:G++},z),a);h=F(b,d.points);l(d.chart.series,function(a){a.xAxis!==c||a.isDrilling||(a.options._ddSeriesId=a.options._ddSeriesId||G++,a.options._colorIndex=a.userOptions._colorIndex,a.options._levelNumber=a.options._levelNumber||u,m?(g=m.levelSeries,k=m.levelSeriesOptions):(g.push(a),k.push(a.options)))});b=p({levelNumber:u,seriesOptions:d.options,levelSeriesOptions:k,
|
13
|
-
levelSeries:g,shapeArgs:b.shapeArgs,bBox:b.graphic?b.graphic.getBBox():{},color:b.isNull?(new f.Color(v)).setOpacity(0).get():v,lowerSeriesOptions:a,pointOptions:d.options.data[h],pointIndex:h,oldExtremes:{xMin:c&&c.userMin,xMax:c&&c.userMax,yMin:e&&e.userMin,yMax:e&&e.userMax}},z);this.drilldownLevels.push(b);a=b.lowerSeries=this.addSeries(a,!1);a.options._levelNumber=u+1;c&&(c.oldPos=c.pos,c.userMin=c.userMax=null,e.userMin=e.userMax=null);d.type===a.type&&(a.animate=a.animateDrilldown||B,a.options.animation=
|
14
|
-
!0)};q.prototype.applyDrilldown=function(){var b=this.drilldownLevels,a;b&&0<b.length&&(a=b[b.length-1].levelNumber,l(this.drilldownLevels,function(b){b.levelNumber===a&&l(b.levelSeries,function(c){c.options&&c.options._levelNumber===a&&c.remove(!1)})}));this.redraw();this.showDrillUpButton()};q.prototype.getDrilldownBackText=function(){var b=this.drilldownLevels;if(b&&0<b.length)return b=b[b.length-1],b.series=b.seriesOptions,H(this.options.lang.drillUpText,b)};q.prototype.showDrillUpButton=function(){var b=
|
15
|
-
this,a=this.getDrilldownBackText(),d=b.options.drilldown.drillUpButton,c,e;this.drillUpButton?this.drillUpButton.attr({text:a}).align():(e=(c=d.theme)&&c.states,this.drillUpButton=this.renderer.button(a,null,null,function(){b.drillUp()},c,e&&e.hover,e&&e.select).addClass("highcharts-drillup-button").attr({align:d.position.align,zIndex:7}).add().align(d.position,!1,d.relativeTo||"plotBox"))};q.prototype.drillUp=function(){for(var b=this,a=b.drilldownLevels,d=a[a.length-1].levelNumber,c=a.length,e=
|
16
|
-
b.series,h,g,k,f,m=function(a){var c;l(e,function(b){b.options._ddSeriesId===a._ddSeriesId&&(c=b)});c=c||b.addSeries(a,!1);c.type===k.type&&c.animateDrillupTo&&(c.animate=c.animateDrillupTo);a===g.seriesOptions&&(f=c)};c--;)if(g=a[c],g.levelNumber===d){a.pop();k=g.lowerSeries;if(!k.chart)for(h=e.length;h--;)if(e[h].options.id===g.lowerSeriesOptions.id&&e[h].options._levelNumber===d+1){k=e[h];break}k.xData=[];l(g.levelSeriesOptions,m);y(b,"drillup",{seriesOptions:g.seriesOptions});f.type===k.type&&
|
17
|
-
(f.drilldownLevel=g,f.options.animation=b.options.drilldown.animation,k.animateDrillupFrom&&k.chart&&k.animateDrillupFrom(g));f.options._levelNumber=d;k.remove(!1);f.xAxis&&(h=g.oldExtremes,f.xAxis.setExtremes(h.xMin,h.xMax,!1),f.yAxis.setExtremes(h.yMin,h.yMax,!1))}y(b,"drillupall");this.redraw();0===this.drilldownLevels.length?this.drillUpButton=this.drillUpButton.destroy():this.drillUpButton.attr({text:this.getDrilldownBackText()}).align();this.ddDupes.length=[]};r.prototype.supportsDrilldown=
|
18
|
-
!0;r.prototype.animateDrillupTo=function(b){if(!b){var a=this,d=a.drilldownLevel;l(this.points,function(a){a.graphic&&a.graphic.hide();a.dataLabel&&a.dataLabel.hide();a.connector&&a.connector.hide()});setTimeout(function(){a.points&&l(a.points,function(a,b){b=b===(d&&d.pointIndex)?"show":"fadeIn";var c="show"===b?!0:void 0;if(a.graphic)a.graphic[b](c);if(a.dataLabel)a.dataLabel[b](c);if(a.connector)a.connector[b](c)})},Math.max(this.chart.options.drilldown.animation.duration-50,0));this.animate=B}};
|
19
|
-
r.prototype.animateDrilldown=function(b){var a=this,d=this.chart.drilldownLevels,c,e=this.chart.options.drilldown.animation,h=this.xAxis;b||(l(d,function(b){a.options._ddSeriesId===b.lowerSeriesOptions._ddSeriesId&&(c=b.shapeArgs,c.fill=b.color)}),c.x+=C(h.oldPos,h.pos)-h.pos,l(this.points,function(b){b.shapeArgs.fill=b.color;b.graphic&&b.graphic.attr(c).animate(p(b.shapeArgs,{fill:b.color||a.color}),e);b.dataLabel&&b.dataLabel.fadeIn(e)}),this.animate=null)};r.prototype.animateDrillupFrom=function(b){var a=
|
20
|
-
this.chart.options.drilldown.animation,d=this.group,c=this;l(c.trackerGroups,function(a){if(c[a])c[a].on("mouseover")});delete this.group;l(this.points,function(c){var e=c.graphic,g=b.shapeArgs,k=function(){e.destroy();d&&(d=d.destroy())};e&&(delete c.graphic,g.fill=b.color,a?e.animate(g,f.merge(a,{complete:k})):(e.attr(g),k()))})};D&&p(D.prototype,{supportsDrilldown:!0,animateDrillupTo:r.prototype.animateDrillupTo,animateDrillupFrom:r.prototype.animateDrillupFrom,animateDrilldown:function(b){var a=
|
21
|
-
this.chart.drilldownLevels[this.chart.drilldownLevels.length-1],d=this.chart.options.drilldown.animation,c=a.shapeArgs,e=c.start,h=(c.end-e)/this.points.length;b||(l(this.points,function(b,k){var g=b.shapeArgs;c.fill=a.color;g.fill=b.color;if(b.graphic)b.graphic.attr(f.merge(c,{start:e+k*h,end:e+(k+1)*h}))[d?"animate":"attr"](g,d)}),this.animate=null)}});f.Point.prototype.doDrilldown=function(b,a,d){var c=this.series.chart,e=c.options.drilldown,f=(e.series||[]).length,g;c.ddDupes||(c.ddDupes=[]);
|
22
|
-
for(;f--&&!g;)e.series[f].id===this.drilldown&&-1===F(this.drilldown,c.ddDupes)&&(g=e.series[f],c.ddDupes.push(this.drilldown));y(c,"drilldown",{point:this,seriesOptions:g,category:a,originalEvent:d,points:void 0!==a&&this.series.xAxis.getDDPoints(a).slice(0)},function(a){var c=a.point.series&&a.point.series.chart,d=a.seriesOptions;c&&d&&(b?c.addSingleSeriesAsDrilldown(a.point,d):c.addSeriesAsDrilldown(a.point,d))})};f.Axis.prototype.drilldownCategory=function(b,a){var d,c,e=this.getDDPoints(b);for(d in e)(c=
|
23
|
-
e[d])&&c.series&&c.series.visible&&c.doDrilldown&&c.doDrilldown(!0,b,a);this.chart.applyDrilldown()};f.Axis.prototype.getDDPoints=function(b){var a=[];l(this.series,function(d){var c,e=d.xData,f=d.points;for(c=0;c<e.length;c++)if(e[c]===b&&d.options.data[c]&&d.options.data[c].drilldown){a.push(f?f[c]:!0);break}});return a};E.prototype.drillable=function(){var b=this.pos,a=this.label,d=this.axis,c="xAxis"===d.coll&&d.getDDPoints,e=c&&d.getDDPoints(b);c&&(a&&e.length?(a.drillable=!0,a.basicStyles||
|
24
|
-
(a.basicStyles=f.merge(a.styles)),a.addClass("highcharts-drilldown-axis-label").css(d.chart.options.drilldown.activeAxisLabelStyle).on("click",function(a){d.drilldownCategory(b,a)})):a&&a.drillable&&(a.styles={},a.css(a.basicStyles),a.on("click",null),a.removeClass("highcharts-drilldown-axis-label")))};x(E.prototype,"addLabel",function(b){b.call(this);this.drillable()});x(f.Point.prototype,"init",function(b,a,d,c){var e=b.call(this,a,d,c);c=(b=a.xAxis)&&b.ticks[c];e.drilldown&&f.addEvent(e,"click",
|
25
|
-
function(b){a.xAxis&&!1===a.chart.options.drilldown.allowPointDrilldown?a.xAxis.drilldownCategory(e.x,b):e.doDrilldown(void 0,void 0,b)});c&&c.drillable();return e});x(f.Series.prototype,"drawDataLabels",function(b){var a=this.chart.options.drilldown.activeDataLabelStyle,d=this.chart.renderer;b.call(this);l(this.points,function(b){var c={};b.drilldown&&b.dataLabel&&("contrast"===a.color&&(c.color=d.getContrast(b.color||this.color)),b.dataLabel.addClass("highcharts-drilldown-data-label"),b.dataLabel.css(a).css(c))},
|
26
|
-
this)});var A,w=function(b){b.call(this);l(this.points,function(a){a.drilldown&&a.graphic&&(a.graphic.addClass("highcharts-drilldown-point"),a.graphic.css({cursor:"pointer"}))})};for(A in t)t[A].prototype.supportsDrilldown&&x(t[A].prototype,"drawTracker",w)})(n)});
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Highcharts JS v5.0.5 (2016-11-29)
|
3
|
-
Exporting module
|
4
|
-
|
5
|
-
(c) 2010-2016 Torstein Honsi
|
6
|
-
|
7
|
-
License: www.highcharts.com/license
|
8
|
-
*/
|
9
|
-
(function(l){"object"===typeof module&&module.exports?module.exports=l:l(Highcharts)})(function(l){(function(f){var l=f.defaultOptions,n=f.doc,A=f.Chart,v=f.addEvent,G=f.removeEvent,D=f.fireEvent,q=f.createElement,B=f.discardElement,w=f.css,p=f.merge,C=f.pick,m=f.each,t=f.extend,H=f.isTouchDevice,E=f.win,I=f.Renderer.prototype.symbols;t(l.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",
|
10
|
-
contextButtonTitle:"Chart context menu"});l.navigation={buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}};p(!0,l.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",background:"none",color:"#333333",fontSize:H?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"},buttonOptions:{symbolFill:"#666666",
|
11
|
-
symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",stroke:"none",padding:5}}});l.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},
|
12
|
-
{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};f.post=function(a,b,e){var d;a=q("form",p({method:"post",action:a,enctype:"multipart/form-data"},e),{display:"none"},n.body);for(d in b)q("input",{type:"hidden",name:d,value:b[d]},null,a);a.submit();B(a)};t(A.prototype,{sanitizeSVG:function(a,b){if(b&&b.exporting&&b.exporting.allowHTML){var e=a.match(/<\/svg>(.*?$)/);e&&(e=
|
13
|
-
'\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+b.chart.width+'" height\x3d"'+b.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+e[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",a=a.replace("\x3c/svg\x3e",e+"\x3c/svg\x3e"))}a=a.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'\x3csvg xmlns:xlink\x3d"http://www.w3.org/1999/xlink" ').replace(/ (NS[0-9]+\:)?href=/g,
|
14
|
-
" xlink:href\x3d").replace(/\n/," ").replace(/<\/svg>.*?$/,"\x3c/svg\x3e").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1\x3d"rgb($2)" $1-opacity\x3d"$3"').replace(/ /g,"\u00a0").replace(/­/g,"\u00ad");return a=a.replace(/<IMG /g,"\x3cimage ").replace(/<(\/?)TITLE>/g,"\x3c$1title\x3e").replace(/height=([^" ]+)/g,'height\x3d"$1"').replace(/width=([^" ]+)/g,'width\x3d"$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href\x3d"$1"/\x3e').replace(/ id=([^" >]+)/g,' id\x3d"$1"').replace(/class=([^" >]+)/g,
|
15
|
-
'class\x3d"$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},getSVG:function(a){var b=this,e,d,g,u,h,c=p(b.options,a);n.createElementNS||(n.createElementNS=function(a,b){return n.createElement(b)});d=q("div",null,{position:"absolute",top:"-9999em",width:b.chartWidth+"px",height:b.chartHeight+"px"},n.body);g=b.renderTo.style.width;h=b.renderTo.style.height;g=c.exporting.sourceWidth||
|
16
|
-
c.chart.width||/px$/.test(g)&&parseInt(g,10)||600;h=c.exporting.sourceHeight||c.chart.height||/px$/.test(h)&&parseInt(h,10)||400;t(c.chart,{animation:!1,renderTo:d,forExport:!0,renderer:"SVGRenderer",width:g,height:h});c.exporting.enabled=!1;delete c.data;c.series=[];m(b.series,function(a){u=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});u.isInternal||c.series.push(u)});e=new f.Chart(c,b.callback);a&&m(["xAxis","yAxis","series"],function(b){var d={};a[b]&&
|
17
|
-
(d[b]=a[b],e.update(d))});m(["xAxis","yAxis"],function(a){m(b[a],function(b,d){d=e[a][d];var c=b.getExtremes();b=c.userMin;c=c.userMax;!d||void 0===b&&void 0===c||d.setExtremes(b,c,!0,!1)})});g=e.getChartHTML();g=b.sanitizeSVG(g,c);c=null;e.destroy();B(d);return g},getSVGForExport:function(a,b){var e=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}},e.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||e.sourceWidth,sourceHeight:a&&a.sourceHeight||e.sourceHeight}}))},exportChart:function(a,
|
18
|
-
b){b=this.getSVGForExport(a,b);a=p(this.options.exporting,a);f.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width||0,scale:a.scale,svg:b},a.formAttributes)},print:function(){var a=this,b=a.container,e=[],d=b.parentNode,g=n.body,f=g.childNodes,h=a.options.exporting.printMaxWidth,c,F;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null,0);D(a,"beforePrint");if(F=h&&a.chartWidth>h)c=[a.options.chart.width,void 0,!1],a.setSize(h,void 0,!1);m(f,function(a,b){1===a.nodeType&&(e[b]=a.style.display,
|
19
|
-
a.style.display="none")});g.appendChild(b);E.focus();E.print();setTimeout(function(){d.appendChild(b);m(f,function(a,b){1===a.nodeType&&(a.style.display=e[b])});a.isPrinting=!1;F&&a.setSize.apply(a,c);D(a,"afterPrint")},1E3)}},contextMenu:function(a,b,e,d,f,u,h){var c=this,g=c.options.navigation,l=c.chartWidth,r=c.chartHeight,p="cache-"+a,k=c[p],x=Math.max(f,u),y,z;k||(c[p]=k=q("div",{className:a},{position:"absolute",zIndex:1E3,padding:x+"px"},c.container),y=q("div",{className:"highcharts-menu"},
|
20
|
-
null,k),w(y,t({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},g.menuStyle)),z=function(){w(k,{display:"none"});h&&h.setState(0);c.openMenu=!1},v(k,"mouseleave",function(){k.hideTimer=setTimeout(z,500)}),v(k,"mouseenter",function(){clearTimeout(k.hideTimer)}),p=v(n,"mouseup",function(b){c.pointer.inClass(b.target,a)||z()}),v(c,"destroy",p),m(b,function(a){if(a){var b;a.separator?b=q("hr",null,null,y):(b=q("div",{className:"highcharts-menu-item",
|
21
|
-
onclick:function(b){b&&b.stopPropagation();z();a.onclick&&a.onclick.apply(c,arguments)},innerHTML:a.text||c.options.lang[a.textKey]},null,y),b.onmouseover=function(){w(this,g.menuItemHoverStyle)},b.onmouseout=function(){w(this,g.menuItemStyle)},w(b,t({cursor:"pointer"},g.menuItemStyle)));c.exportDivElements.push(b)}}),c.exportDivElements.push(y,k),c.exportMenuWidth=k.offsetWidth,c.exportMenuHeight=k.offsetHeight);b={display:"block"};e+c.exportMenuWidth>l?b.right=l-e-f-x+"px":b.left=e-x+"px";d+u+c.exportMenuHeight>
|
22
|
-
r&&"top"!==h.alignOptions.verticalAlign?b.bottom=r-d-x+"px":b.top=d+u-x+"px";w(k,b);c.openMenu=!0},addButton:function(a){var b=this,e=b.renderer,d=p(b.options.navigation.buttonOptions,a),f=d.onclick,l=d.menuItems,h,c,m=d.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]);if(!1!==d.enabled){var n=d.theme,r=n.states,q=r&&r.hover,r=r&&r.select,k;delete n.states;f?k=function(a){a.stopPropagation();f.call(b,a)}:l&&(k=function(){b.contextMenu(c.menuClassName,
|
23
|
-
l,c.translateX,c.translateY,c.width,c.height,c);c.setState(2)});d.text&&d.symbol?n.paddingLeft=C(n.paddingLeft,25):d.text||t(n,{width:d.width,height:d.height,padding:0});c=e.button(d.text,0,0,k,n,q,r).addClass(a.className).attr({"stroke-linecap":"round",title:b.options.lang[d._titleKey],zIndex:3});c.menuClassName=a.menuClassName||"highcharts-menu-"+b.btnCount++;d.symbol&&(h=e.symbol(d.symbol,d.symbolX-m/2,d.symbolY-m/2,m,m).addClass("highcharts-button-symbol").attr({zIndex:1}).add(c),h.attr({stroke:d.symbolStroke,
|
24
|
-
fill:d.symbolFill,"stroke-width":d.symbolStrokeWidth||1}));c.add().align(t(d,{width:c.width,x:C(d.x,b.buttonOffset)}),!0,"spacingBox");b.buttonOffset+=(c.width+d.buttonSpacing)*("right"===d.align?-1:1);b.exportSVGElements.push(c,h)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;var e=b.exportDivElements;a&&(m(a,function(a,e){a&&(a.onclick=a.ontouchstart=null,b.exportSVGElements[e]=a.destroy())}),a.length=0);e&&(m(e,function(a,e){clearTimeout(a.hideTimer);G(a,"mouseleave");
|
25
|
-
b.exportDivElements[e]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;B(a)}),e.length=0)}});I.menu=function(a,b,e,d){return["M",a,b+2.5,"L",a+e,b+2.5,"M",a,b+d/2+.5,"L",a+e,b+d/2+.5,"M",a,b+d-1.5,"L",a+e,b+d-1.5]};A.prototype.renderExporting=function(){var a,b=this.options.exporting,e=b.buttons,d=this.isDirtyExporting||!this.exportSVGElements;this.buttonOffset=0;this.isDirtyExporting&&this.destroyExport();if(d&&!1!==b.enabled){for(a in e)this.addButton(e[a]);this.isDirtyExporting=!1}v(this,
|
26
|
-
"destroy",this.destroyExport)};A.prototype.callbacks.push(function(a){a.renderExporting();v(a,"redraw",a.renderExporting);m(["exporting","navigation"],function(b){a[b]={update:function(e,d){a.isDirtyExporting=!0;p(!0,a.options[b],e);C(d,!0)&&a.redraw()}}})})})(l)});
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Highcharts JS v5.0.5 (2016-11-29)
|
3
|
-
Solid angular gauge module
|
4
|
-
|
5
|
-
(c) 2010-2016 Torstein Honsi
|
6
|
-
|
7
|
-
License: www.highcharts.com/license
|
8
|
-
*/
|
9
|
-
(function(l){"object"===typeof module&&module.exports?module.exports=l:l(Highcharts)})(function(l){(function(f){var l=f.pInt,t=f.pick,m=f.each,v=f.isNumber,n;n={initDataClasses:function(a){var c=this,d=this.chart,e,u=0,h=this.options;this.dataClasses=e=[];m(a.dataClasses,function(g,b){g=f.merge(g);e.push(g);g.color||("category"===h.dataClassColor?(b=d.options.colors,g.color=b[u++],u===b.length&&(u=0)):g.color=c.tweenColors(f.color(h.minColor),f.color(h.maxColor),b/(a.dataClasses.length-1)))})},initStops:function(a){this.stops=
|
10
|
-
a.stops||[[0,this.options.minColor],[1,this.options.maxColor]];m(this.stops,function(a){a.color=f.color(a[1])})},toColor:function(a,c){var d=this.stops,e,f,h=this.dataClasses,g,b;if(h)for(b=h.length;b--;){if(g=h[b],e=g.from,d=g.to,(void 0===e||a>=e)&&(void 0===d||a<=d)){f=g.color;c&&(c.dataClass=b);break}}else{this.isLog&&(a=this.val2lin(a));a=1-(this.max-a)/(this.max-this.min);for(b=d.length;b--&&!(a>d[b][0]););e=d[b]||d[b+1];d=d[b+1]||e;a=1-(d[0]-a)/(d[0]-e[0]||1);f=this.tweenColors(e.color,d.color,
|
11
|
-
a)}return f},tweenColors:function(a,c,d){var e;c.rgba.length&&a.rgba.length?(a=a.rgba,c=c.rgba,e=1!==c[3]||1!==a[3],a=(e?"rgba(":"rgb(")+Math.round(c[0]+(a[0]-c[0])*(1-d))+","+Math.round(c[1]+(a[1]-c[1])*(1-d))+","+Math.round(c[2]+(a[2]-c[2])*(1-d))+(e?","+(c[3]+(a[3]-c[3])*(1-d)):"")+")"):a=c.input||"none";return a}};m(["fill","stroke"],function(a){f.Fx.prototype[a+"Setter"]=function(){this.elem.attr(a,n.tweenColors(f.color(this.start),f.color(this.end),this.pos),null,!0)}});f.seriesType("solidgauge",
|
12
|
-
"gauge",{colorByPoint:!0},{translate:function(){var a=this.yAxis;f.extend(a,n);!a.dataClasses&&a.options.dataClasses&&a.initDataClasses(a.options);a.initStops(a.options);f.seriesTypes.gauge.prototype.translate.call(this)},drawPoints:function(){var a=this,c=a.yAxis,d=c.center,e=a.options,f=a.chart.renderer,h=e.overshoot,g=v(h)?h/180*Math.PI:0,b;v(e.threshold)&&(b=c.startAngleRad+c.translate(e.threshold,null,null,null,!0));this.thresholdAngleRad=t(b,c.startAngleRad);m(a.points,function(b){var h=b.graphic,
|
13
|
-
k=c.startAngleRad+c.translate(b.y,null,null,null,!0),m=l(t(b.options.radius,e.radius,100))*d[2]/200,p=l(t(b.options.innerRadius,e.innerRadius,60))*d[2]/200,q=c.toColor(b.y,b),r=Math.min(c.startAngleRad,c.endAngleRad),n=Math.max(c.startAngleRad,c.endAngleRad);"none"===q&&(q=b.color||a.color||"none");"none"!==q&&(b.color=q);k=Math.max(r-g,Math.min(n+g,k));!1===e.wrap&&(k=Math.max(r,Math.min(n,k)));r=Math.min(k,a.thresholdAngleRad);k=Math.max(k,a.thresholdAngleRad);k-r>2*Math.PI&&(k=r+2*Math.PI);b.shapeArgs=
|
14
|
-
p={x:d[0],y:d[1],r:m,innerR:p,start:r,end:k,fill:q};b.startR=m;h?(b=p.d,h.animate(p),b&&(p.d=b)):(b.graphic=f.arc(p).addClass("highcharts-point").attr({fill:q,"sweep-flag":0}).add(a.group),"square"!==e.linecap&&b.graphic.attr({"stroke-linecap":"round","stroke-linejoin":"round"}),b.graphic.attr({stroke:e.borderColor||"none","stroke-width":e.borderWidth||0}))})},animate:function(a){a||(this.startAngleRad=this.thresholdAngleRad,f.seriesTypes.pie.prototype.animate.call(this,a))}})})(l)});
|