Some utilities and helper function for Highcharts