我单独访问链接没有 JS 报错,但我从其他页面点链接进去就报 hightcharts 已经定义加载的错误,貌似页面有缓存,但我在开发模式,按理说缓存都关掉的。 具体代码如下: view:
<% provide(:title, 'Change_WC Charts') %>
<div id="container"></div>
<%= include_gon %>
<%= javascript_include_tag 'highstock', cache:true%>
<%= javascript_include_tag 'modules/exporting', cache:true%>
<%= javascript_include_tag "dashboard_tzixuns",cache:true %>
coffeescript:
$("#container").highcharts('StockChart',{
rangeSelector :
inputEnabled: $('#container').width() > 480,
selected : 1
title :
text : 'CHANGE WC 未分配任务趋势图'
series:[
name: '未分配任务'
data: gon.data
]
})
报错信息: Uncaught Highcharts error #16: www.highcharts.com/errors/16 highstock.js?body=1:15 Uncaught TypeError: undefined is not a function