AngularJS directive for Highcharts
Pull request Compare This branch is 4 commits ahead, 283 commits behind pablojim:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is a fork from pablojim's highcharts-ng directive. This caters for using highstock charts instead of highcharts. The directive is different than to pablojim's directive. Instead of attributes on the element, this binds to a model, which mirrors the config in the highstock api. This is more appropriate imo, e.g. on highchart element you specify title attr, but then you get the attribute value as tooltip when you hover on the chart.


Include highstocks-ng file. The directive can only be used as an element called highstock. The element must have a ng-model assigned to it.

html: <highstock ng-model="mychart"></highstock>

controller: $scope.mychart = { title: { text: 'highstock ftw' }, series: [] }


  • Does not resize to 100% width of parent. (same issue with highcharts-ng).
  • Currently only listens if series object changes and recreates chart, thus it's not dynamic (WIP)


AngularJS directive for Highcharts

A simple Angularjs directive for Highcharts.

<highchart id="chart1" series="chart.series" title="chart.title" options="chart.options"></highchart>

See an example here:


  • Adding and removing series
  • Setting/Updating Chart options
  • Updating the chart title


  • Due to many equality checks the directive maybe slow with large datasets (this is solvable though...)
  • Whole Chart/Series is often redrawn where a simple update of data would suffice
  • Needs tests!

See an example here: