简体   繁体   English

无法在Rails上的ruby的骨架JS中使用实心高度图表

[英]Unable to use solid-gauge highchart in backboneJS from ruby on rails

I want to use solid-gauge highchart in my rails app and I am using backbonejs. 我想在我的rails应用程序中使用实心高程图表,并且正在使用ribsjs。 For using solid-gauge i copied the files highcharts.js, highcharts-more,js , highcharts-3d.js and solid-gauge.js from http://code.highcharts.com/ on to my assets -> javascript -> backbone -> lib directory. 为了使用solid-gauge,我将文件highcharts.js,highcharts-more,js,highcharts-3d.js和solid-gauge.js从http://code.highcharts.com/复制到了我的资产-> javascript->骨干-> lib目录。 When I run the code I get the error as 当我运行代码时,我得到错误为

Uncaught TypeError: Cannot read property 'prototype' of undefined Uncaught TypeError:无法读取未定义的属性“ prototype”

which points to the solid-gauge.js file that is inside the lib directory. 指向lib目录中的solid-gauge.js文件。 Am I missing any dependencies? 我是否缺少任何依赖关系?

I found the solution. 我找到了解决方案。 The problem was that the solid-gauge.js and highcharts.js files were different versions and thus causing errors. 问题在于,solid-gauge.js和highcharts.js文件的版本不同,因此会导致错误。 The problem was solved by updating all the header files to their latest versions. 通过将所有头文件更新为最新版本,解决了该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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