var wmfBarChart={mode:"desktop",ishome:null,init:function(order,ishome,callback){var self=this;self.mode=(window.innerWidth<991)?"mobile":"desktop";self.ishome=ishome;$.getJSON('?q=/'+lang+'/data/chart/wmfBarChart/order/'+order,function(_data){var data=self.decode(_data);$('#wmfBarChartContainer').highcharts(self.getJSON(data),function(chart){self.chart=chart;self.drawBackground()})})},decode:function(_data){return _data.mainData},colors:{bar1:"#DE5B12",bar2:"#FFA219"},margin:{mobile:60,desktop:90},left_margin:{mobile:50,desktop:90},right_margin:{mobile:20,desktop:90},chartheight:{mobile:267,desktop:277},getJSON:function(data){var self=this;var mcode=[];var bar1=[];var bar2=[];for(i=0;i '+this.x+'';_html+='
'+this.series.name+'';_html+='
'+this.y+'';return _html}},plotOptions:{column:{minPointLength:2}},series:[{name:this.labels[lang].series_name_1,data:bar1,color:this.colors["bar1"]},{name:this.labels[lang].series_name_2,data:bar2,color:this.colors["bar2"]}],exporting:{enabled:false},}},redraw:function(){var chart=this.chart;var offsetx,offsety;var self=this;var distance=chart.plotWidth/5;offsetx=chart.plotLeft-distance;offsety=50;$("#wmfChartBackground1").remove();for(var i=1;i<=6;i++){$("#wmfstockconnectpath"+i).remove();chart.renderer.path(['M',offsetx+distance*i,offsety+self.chartheight[self.mode]-20,'L',offsetx+distance*i,offsety]).attr({id:'wmfstockconnectpath'+i,'stroke-width':0.5,stroke:'#C0D0E0'}).add()}chart.renderer.rect(self.left_margin[self.mode],20,chart.plotWidth,self.chartheight[self.mode],0).attr({fill:'#F9F9F9',stroke:'#C0C0C0','stroke-width':1,id:'wmfChartBackground1',}).add()},drawBackground:function(){var chart=this.chart;var offsetx,offsety;var self=this;this.redraw()},labels:{tc:{yTitle:"




",series_name_1:"認購",series_name_2:"認沽",},sc:{yTitle:"




",series_name_1:"认购",series_name_2:"认沽",},en:{yTitle:"HKD(Million)",series_name_1:"Call",series_name_2:"Put",},},}