Reused some code from great ObHighCharts bundle.