reports_kit icon indicating copy to clipboard operation
reports_kit copied to clipboard

unable to load charts

Open smitakiran25 opened this issue 5 years ago • 2 comments

I am using

versions

ruby -2.4.5 rails- 5.2 bootstrap sb-admin-2 postgresql

app/assets/javascripts/application.js

//= require jquery //= require jquery_ujs //= require turbolinks //= require reports_kit/application //= require bootstrap_sb_admin_base_v2 //= require font_awesome5 //= require all //= require cable //= require dataTables.bootstrap4.min //= require jquery.dataTables.min //= require jquery.easing.min //= require popper //= require bootstrap //= require Chart.bundle //= require chartkick //= require activestorage //= require_tree .

app/assets/stylesheets/application.css

*= require bootstrap_sb_admin_base_v2 *= require font-awesome *= require font_awesome5_webfont *= require dataTables.bootstrap4.min *= require reports_kit/application *= require_tree . *= require_self

config/reports_kit/reports/my_users.yml

   measure: user
   dimensions:
  - created_at

app/views/dashboard

xxxxxx

config/routes.rb mount ReportsKit::Engine, at: '/'

chart is loading after refreshing, only download buttons are displaying and after refreshing the ui is also not coming correctly

report

after refreshing

reports1

smitakiran25 avatar Mar 12 '19 11:03 smitakiran25

Please verify now, I have added "turbolinks:load" as below to file

vi ~/.rvm/gems/ruby-2.4.5/gems/reports_kit-0.7.1/app/assets/javascripts/reports_kit/lib/_init.js

window.ReportsKit = {};

//$(document).ready(function() {
var ready = function() {
  $('.reports_kit_report').each(function(index, el) {
    var el = $(el)
    var reportClass = el.data('report-class');
    new ReportsKit[reportClass]().render({ 'el': el });
  });
 }
//});

$(document).on('turbolinks:load', ready);

kirantpatil avatar Mar 14 '19 11:03 kirantpatil

@tombenner, could you please verify and release a new version with this fix.

Thanks.

kirantpatil avatar Mar 26 '19 08:03 kirantpatil