Using HighStock - xiaods/lazy_high_charts GitHub Wiki

HighStock is great for timeseries-type graphics, with selectable periods and everything, but it won't work just described in the README, at least under my 3.2.11 Rails.

I was able to get HighStock working doing the following to my application:

  • Add to app/assets/javascript/application.js:

//= require highcharts

//= require highstock

  • And to app/views/layouts/application.html.erb

<%= javascript_include_tag :highcharts %>

<%= javascript_include_tag :highstock %>

  • Then in yout view:

<%= high_stock("my_id", @h) %>

Just use the same Controller functions as for regular HighCharts.