Resolve Conflict When Using Highchart and Highmap together (TypeError: ma is not a function)

后端 未结 3 1910
Happy的楠姐
Happy的楠姐 2021-01-01 19:10

I\'ve a page that contain chart and map menu for report function. Then, I choose Highchart-Highmap library to reach the purpose above. The chart function runs well but when

相关标签:
3条回答
  • 2021-01-01 19:46

    Instead of highmaps, you need to use map.js module.

    <script src="//code.highcharts.com/maps/modules/map.js"></script>
    

    Here is the documentation on using both together.

    0 讨论(0)
  • 2021-01-01 19:54

    You must include this script tag after highcharts.js:

    <script src="https://code.highcharts.com/maps/modules/map.js"></script> 
    
    0 讨论(0)
  • 2021-01-01 19:54

    I encountered the same issue, and resolved it by placing highcharts after the maps

    <script src="http://code.highcharts.com/maps/highmaps.js"></script>
    <script src="http://code.highcharts.com/maps/modules/data.js"></script>
    <script src="http://code.highcharts.com/maps/modules/exporting.js"></script>
    <script src="http://code.highcharts.com/mapdata/custom/world.js"></script>
    <script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
    

    http://jsfiddle.net/danny_shumer/tc898kgv/2/

    0 讨论(0)
提交回复
热议问题