raspberry-pi-absensi/assets/scripts/chart.highcharts.init.min.js

1 line
5.4 KiB
JavaScript
Raw Permalink Normal View History

!function(e){"use strict";var t={};e(document).ready(function(){return e("#3d-highcharts").length&&t.bar_3d(),e("#3dscatter-highcharts").length&&t.pie_3d(),e("#3d-highcharts").length&&t.scatter_3d(),e("#3dstacking-highcharts").length&&t.stacking_3d(),e("#random-highcharts").length&&t.random_data(),e("#click-highcharts").length&&t.click_data(),!1}),t={bar_3d:function(){new Highcharts.Chart({chart:{renderTo:"3d-highcharts",type:"column",options3d:{enabled:!0,alpha:15,beta:15,depth:50,viewDistance:25}},title:{text:"Bar Chart Demo"},plotOptions:{column:{depth:25}},series:[{data:[29.9,71.5,106.4,129.2,144,176,135.6,148.5,216.4,194.1,95.6,54.4]}]});return!1},pie_3d:function(){return e("#3dpie-highcharts").highcharts({chart:{type:"pie",options3d:{enabled:!0,alpha:45,beta:0}},title:{text:"Browser market shares at a specific website, 2014"},tooltip:{pointFormat:"{series.name}: <b>{point.percentage:.1f}%</b>"},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",depth:35,dataLabels:{enabled:!0,format:"{point.name}"}}},series:[{type:"pie",name:"Browser share",data:[["Firefox",45],["IE",26.8],{name:"Chrome",y:12.8,sliced:!0,selected:!0},["Safari",8.5],["Opera",6.2],["Others",.7]]}]}),!1},scatter_3d:function(){Highcharts.getOptions().colors=e.map(Highcharts.getOptions().colors,function(e){return{radialGradient:{cx:.4,cy:.3,r:.5},stops:[[0,e],[1,Highcharts.Color(e).brighten(-.2).get("rgb")]]}});var t=new Highcharts.Chart({chart:{renderTo:"3dscatter-highcharts",margin:100,type:"scatter",options3d:{enabled:!0,alpha:10,beta:30,depth:250,viewDistance:5,fitToPlot:!1,frame:{bottom:{size:1,color:"rgba(0,0,0,0.02)"},back:{size:1,color:"rgba(0,0,0,0.04)"},side:{size:1,color:"rgba(0,0,0,0.06)"}}}},title:{text:"Draggable box"},subtitle:{text:"Click and drag the plot area to rotate in space"},plotOptions:{scatter:{width:10,height:10,depth:10}},yAxis:{min:0,max:10,title:null},xAxis:{min:0,max:10,gridLineWidth:1},zAxis:{min:0,max:10,showFirstLabel:!1},legend:{enabled:!1},series:[{name:"Reading",colorByPoint:!0,data:[[1,6,5],[8,7,9],[1,3,4],[4,6,8],[5,7,7],[6,9,6],[7,0,5],[2,3,3],[3,9,8],[3,6,5],[4,9,4],[2,3,3],[6,9,9],[0,7,0],[7,7,9],[7,2,9],[0,6,2],[4,6,7],[3,7,7],[0,1,7],[2,8,6],[2,3,7],[6,4,8],[3,5,9],[7,9,5],[3,1,7],[4,4,2],[3,6,2],[3,1,6],[6,8,5],[6,6,7],[4,1,1],[7,2,7],[7,7,0],[8,8,9],[9,4,1],[8,3,4],[9,8,9],[3,5,3],[0,2,4],[6,0,2],[2,1,3],[5,8,9],[2,1,1],[9,7,6],[3,0,2],[9,9,0],[3,4,8],[2,6,1],[8,9,2],[7,6,5],[6,3,1],[9,3,1],[8,9,3],[9,1,0],[3,8,7],[8,0,0],[4,9,7],[8,6,2],[4,3,0],[2,3,5],[9,1,4],[1,1,4],[6,0,2],[6,1,6],[3,8,8],[8,8,7],[5,5,0],[3,9,6],[5,4,3],[6,8,3],[0,1,5],[6,7,3],[8,3,2],[3,8,3],[2,1,6],[4,6,7],[8,9,9],[5,4,2],[6,1,3],[6,9,5],[4,8,2],[9,7,4],[5,4,2],[9,6,1],[2,7,3],[4,5,4],[6,8,1],[3,4,0],[2,2,6],[5,1,2],[9,9,7],[6,9,9],[8,4,3],[4,1,7],[6,2,5],[0,4,9],[3,5,9],[6,9,1],[1,9,2]]}]});return e(t.container).on("mousedown.hc touchstart.hc",function(s){s=t.pointer.normalize(s);var n,i,o=s.pageX,a=s.pageY,r=t.options.chart.options3d.alpha,c=t.options.chart.options3d.beta,l=5;e(document).on({"mousemove.hc touchdrag.hc":function(e){i=c+(o-e.pageX)/l,t.options.chart.options3d.beta=i,n=r+(e.pageY-a)/l,t.options.chart.options3d.alpha=n,t.redraw(!1)},"mouseup touchend":function(){e(document).off(".hc")}})}),!1},stacking_3d:function(){return e("#3dstacking-highcharts").highcharts({chart:{type:"column",options3d:{enabled:!0,alpha:15,beta:15,viewDistance:25,depth:40}},title:{text:"Total fruit consumption, grouped by gender"},xAxis:{categories:["Apples","Oranges","Pears","Grapes","Bananas"]},yAxis:{allowDecimals:!1,min:0,title:{text:"Number of fruits"}},tooltip:{headerFormat:"<b>{point.key}</b><br>",pointFormat:'<span style="color:{series.color}">●</span> {series.name}: {point.y} / {point.stackTotal}'},plotOptions:{column:{stacking:"normal",depth:40}},series:[{name:"John",data:[5,3,4,7,2],stack:"male"},{name:"Joe",data:[3,4,4,2,5],stack:"male"},{name:"Jane",data:[2,5,6,2,1],stack:"female"},{name:"Janet",data:[3,0,4,4,3],stack:"female"}]}),!1},random_data:function(){return Highcharts.setOptions({global:{useUTC:!1}}),e("#random-highcharts