Emberjs and Highcharts

App.HighChartsView=Ember.View.extendtagName:'div'classNames:['highcharts']chartConfig={}setConfig:(type)->config={chart:type:typetitle:text:@title||'Highcharts'xAxis:categories:@dataset.categories||[]yAxis:title:text:@yAxisTitleseries:@series()}# Merge highcharts config if it is presentEmber.merge(config,@highChartConfig)if@highChartConfig@set('chartConfig',config)series:->@dataset.dataprepareConfig:-># if custom config is present then directly set it to chartConfigif@customHighChartConfig@set('chartConfig',@customHighChartConfig)elsetype=@type||'line'@setConfig(type)didInsertElement:->@prepareConfig()@renderHighchart()renderHighchart:->@$().highcharts(@chartConfig)