简体   繁体   English

将HighMaps JQuery的数据更改为本地文件

[英]Changing Data for HighMaps JQuery to a local file

I am using this code - Jfiddle link to create a datamap of the United States. 我正在使用此代码-Jfiddle链接来创建美国的数据映射。 I would like to modify the data set in the example by using a file stored locally. 我想通过使用本地存储的文件来修改示例中的数据集。

The data appears to be stored in a file located at: http://www.highcharts.com/samples/data/us-population-density.json . 数据似乎存储在位于http://www.highcharts.com/samples/data/us-population-density.json的文件中。

I changed the filename in to be a local drive, but the chart won't load. 我将文件名更改为本地驱动器,但该图表无法加载。 What changes do I need to make? 我需要进行哪些更改?

Reference to my local drive: 参考我的本地驱动器:

$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=C:/us-population-density.json&callback=?', function (data) {

try: 尝试:

 $.getJSON('us-population-density.json', function(data) {

According to to highcharts reference 根据高图参考

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

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