agrobbin / highcharts-js-rails

Easily configure a Highcharts JS chart for use in a Rails application
MIT License
16 stars 8 forks source link

How do you use a theme? #1

Closed styledev closed 12 years ago

styledev commented 12 years ago

How would one enable a theme for highcharts? If we include it in the asset pipeline then it gets loaded in before Highcharts.js and thus will not work.

styledev commented 12 years ago

Actually I guess you can just load it inline via <%= javascript_include_tag "gray" %>

agrobbin commented 12 years ago

Use the newest released version, 0.1.8, and add the theme to your application.js file like so:

//= require highcharts/themes/dark-blue

Make sure to include it after the //= require highcharts line. That should include it appropriately.