我正在尝试使用Highmaps作为Highcharts源文件(highcharts.js和map.js文件)的集成插件,如"入门"文档页面 - >"加载所需文件"部分所述.
对于系列类型,Map Bubble在页面上不显示任何内容.
见jsFiddle:
http :
//jsfiddle.net/mihaelaCiocoiu/pvPur/3/
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/maps/modules/map.js"></script>
<script src="http://code.highcharts.com/maps/modules/data.js"></script>
<script src="http://www.highcharts.com/samples/data/maps/us.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
Run Code Online (Sandbox Code Playgroud)
$(function () {
$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=world-population.json&callback=?', function (data) {
$('#container').highcharts('Map', {
chart : {
borderWidth : 1
},
title: {
text: 'World population 2010 by country'
},
subtitle : {
text : 'Demo of Highcharts map with bubbles'
},
legend: {
enabled: false
},
mapNavigation: {
enabled: true,
buttonOptions: {
verticalAlign: 'bottom'
}
},
series : [{
name: 'Countries',
mapData: Highcharts.maps.world,
color: '#E0E0E0',
enableMouseTracking: false
}, {
type: 'mapbubble',
mapData: Highcharts.maps.world,
name: 'Population 2010',
joinBy: 'code',
data: data,
minSize: 4,
maxSize: '12%',
tooltip: {
pointFormat: '{point.code}: {point.z} thousands'
}
}]
});
});
Run Code Online (Sandbox Code Playgroud)
});
先感谢您!
对于未来,我建议使用控制台(开发人员工具),然后您会注意到highcharts会返回#17错误,这意味着highcharts-more.js缺少.
工作示例:http://jsfiddle.net/pvPur/5/
| 归档时间: |
|
| 查看次数: |
2394 次 |
| 最近记录: |