HighCharts和地图泡泡不兼容 [英] HighCharts and Map Bubble are not compatible

查看:129
本文介绍了HighCharts和地图泡泡不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将Highmaps作为集成插件与Highcharts源文件(highcharts.js和map.js文件)一起使用,如入门文档页面 - >加载所需文件部分中所述。

I am trying to use Highmaps as an integrated plugin with Highcharts source file (highcharts.js and map.js files), like described in Getting Started doc page --> section "Load Required files".

对于系列类型地图泡泡,页面上不会显示任何内容。
请参阅jsFiddle:

http://jsfiddle.net/mihaelaCiocoiu/pvPur/3/

For the series type Map Bubble is not displaying nothing on the page.
See 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>


$(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'
            }
        }]
    });

});

});

谢谢提前!

Thank you in advance!

推荐答案

对于将来,我建议使用控制台(开发人员工具),那么您会注意到, href =http://www.highcharts.com/errors/17>#17错误,这意味着缺少 highcharts-more.js

For the future, I advice to use console (developer tools) then you will notice that highcharts returns you #17 error, which means that highcharts-more.js is missing.

工作示例: http://jsfiddle.net/pvPur/5/

这篇关于HighCharts和地图泡泡不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆