highcharts: simplify code a bit