add high charts javascript and change type of chart in life cycle