masweetman / issue_charts

Allows Redmine users to create simple charts and graphs for issues
28 stars 10 forks source link

How to use Chart.js / Highchart.js as charting library #39

Open mchengh opened 5 years ago

mchengh commented 5 years ago

Hi,

Just hit the same issue #32, not sure whether caused by the default charting library uses <%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %> , and unfortunately we can't connect to google.com/jsapi, so no charts would display.

Is there a guide about how we can download the offline chart libs ( Chart.js or highchart.js ) and set one of them for the plugin to use ?

Thank you ~

mchengh commented 5 years ago

Here's the try, and the charts could display :

  1. Download highcharts from https://www.highcharts.com/blog/download/
  2. unzip and copy highcharts.js to htdoc/public/javascripts/
  3. edit plugins/issue_charts/app/views/charts/index.html.erb and show.html.erb change '<%= javascript_include_tag "http://www.google.com/jsapi", "chartkick" %> ' to '<%= javascript_include_tag "highcharts.js", "chartkick" %> '