简体   繁体   中英

Chartkick charts not visible

I have been having this issue for a while and would really appreciate some help. I have a chartkick problem. My charts don't show on the front end at all.

My application.js looks like

    //= require rails-ujs
//= require activestorage
//= require underscore
//= require gmaps/google
//= require icalendar
//= require turbolinks
//= require bootstrap
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require autocomplete-rails
//= require apexcharts
//= require chartkick
//= require Chart.bundle
//= require jquery_ujs
//= require jquery.ui.datepicker
//= require data-turbolinks-trackn
//= require_gmaps.js
//= require cocoon
//= gmaps
//= require_tree
//= require seems_rateable
//= require_directory ./rateable
 .

On the view page it shows code such as

<%= area_chart @invoices.where(['invoice_date > ?', 365.days.ago]).group_by_month(:invoice_date).sum(:payment), prefix: "$", suffix: "$", defer: true, download: true, colors: ["#b00", "#333"], legend: "bottom", code: "true", defer: true  %>

I have nothing in the header of my application.html.erb and my gem file shows

#Charts for rails chartkick and groupdate to group by date/month/etc gem 'groupdate' gem 'chartkick'

As I said, I've been toying with this issue for a while and really want to get it fixed to publish my first iterration of the app. Thanks again. Evan

My mistake here was that I had deleted the reference to the Chartkick javascript, I had accidentally deleted

<%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>

Thanks to Josh for the new info on Java consoles, all the best to you all in this COVID-19 times.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM