扫码关注官方订阅号
尝试写一个demo页面,但是没有显示,不知道怎么回事。能不能帮忙看下,谢谢。
光阴似箭催人老,日月如移越少年。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <script src="http://cdn.bootcss.com/jquery/3.0.0-beta1/jquery.min.js"></script> <script src="https://code.highcharts.com/maps/highmaps.js"></script> <script src="https://code.highcharts.com/maps/modules/data.js"></script> <script src="https://code.highcharts.com/maps/modules/exporting.js"></script> <script src="http://code.highcharts.com/mapdata/custom/world.js"></script> <script type="text/javascript"> $(function () { $.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=world-population.json&callback=?', function (data) { var mapData = Highcharts.geojson(Highcharts.maps['custom/world']); // Correct UK to GB in data $.each(data, function () { if (this.code === 'UK') { this.code = 'GB'; } }); $('#container').highcharts('Map', { chart : { borderWidth : 1 }, title: { text: 'World population 2013 by country' }, subtitle : { text : 'Demo of Highcharts map with bubbles' }, legend: { enabled: true }, mapNavigation: { enabled: true, buttonOptions: { verticalAlign: 'bottom' } }, series : [{ name: 'Countries', mapData: mapData, color: '#E0E0E0', enableMouseTracking: false }, { type: 'mapbubble', mapData: mapData, name: 'Population 2013', joinBy: ['iso-a2', 'code'], data: data, minSize: 4, maxSize: '12%', tooltip: { pointFormat: '{point.code}: {point.z} thousands' } }] }); }); }); </script> </head> <body> <p id="container" style="height: 500px; min-width: 310px; max-width: 800px;"></p> </body> </html> 两处错误 一个是true写成了ture 还有就是jquery要放在highcharts之前加载
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
光阴似箭催人老,日月如移越少年。