gpt4 book ai didi

javascript - 解决Highchart和Highmap一起使用时的冲突(TypeError : ma is not a function)

转载 作者:可可西里 更新时间:2023-11-01 01:35:49 26 4
gpt4 key购买 nike

我有一个页面,其中包含用于报告功能的图表和 map 菜单。然后,我选择了Highchart-Highmap库来达到上面的目的。图表功能运行良好,但是当我开发 map 功能时出现错误

TypeError: ma is not a function

  • 我已经追踪到 ma 函数出现在 highchart.js 和 highmaps.js 中的问题,但我不知道如何解决这个冲突。
  • 我尝试将 jQuery.noConflict(); 放在 Highcharts 中,但冲突仍然出现

这是我在主页中编码的方式

... some html code
<script type="text/javascript" src="././js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="././js/highcharts/highcharts-more.js"></script>
<script type="text/javascript" src="././js/highcharts/highcharts-3d.js"></script>
<script type="text/javascript" src="././js/highcharts/modules/drilldown.js"></script>
<script type="text/javascript" src="././js/highcharts/modules/exporting.js"></script>

... some html code
<script type="text/javascript" src="././js/Highmaps/highmaps.js"></script>
<script type="text/javascript" src="././js/Highmaps/modules/data.js"></script>
<script type="text/javascript" src="././js/Highmaps/modules/exporting.js"></script>

我该如何解决这个问题?

最佳答案

您需要使用 map.js 模块来代替 Highcharts 。

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

Here is the documentation on using both together .

关于javascript - 解决Highchart和Highmap一起使用时的冲突(TypeError : ma is not a function),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25230483/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com