generate highcharts code