var bbRatioChart={mode:"desktop",init:function(date,callback){var self=this;$.getJSON('/'+lang+'/data/chart/bbRatioChart/date/'+date,function(_data){var data=self.decode(_data);$('#bbRatioChartContainer').highcharts(self.getJSON(data),function(){if(callback!==undefined){callback(chart,data)}})})},decode:function(_data){return _data.mainData},getJSON:function(data){var self=this;return{chart:{spacingTop:0,spacingBottom:0,spacingLeft:0,spacingRight:0,plotBackgroundColor:null,plotBorderWidth:null,plotShadow:false,type:'pie',options3d:{enabled:true,alpha:45,beta:0}},title:{text:null},tooltip:{pointFormat:self.labels[lang].msg+' {point.percentage:.0f}%'},plotOptions:{pie:{size:'100%',allowPointSelect:false,cursor:'pointer',depth:35,dataLabels:{enabled:((self.mode=="desktop")?true:false),distance:-30,format:'{point.percentage:.0f}%',style:{color:(Highcharts.theme&&Highcharts.theme.contrastTextColor)||'black'}},showInLegend:true,colors:["#009fda","#ffb612"],borderWidth:0}},legend:{enabled:true,layout:((self.mode=="desktop")?'vertical':'horizontal'),align:((self.mode=="desktop")?'right':'center'),verticalAlign:((self.mode=="desktop")?'middle':'bottom'),labelFormatter:function(){return this.name},itemMarginBottom:((self.mode=="desktop")?15:0),},series:[{colorByPoint:true,data:data}],exporting:{enabled:false},}},labels:{tc:{msg:"街貨量分佈(%):",},sc:{msg:"街货量分布(%):",},en:{msg:"Outstanding Distribution(%):",},},}