在本地使用 HighChart JS 文件

Using HighChart JS files locally

我正在尝试在本地代码中使用 highchats js 文件。当我如下使用官方 link 时,它正在工作

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 400px; min-width: 310px; max-width: 600px; margin: 0 auto"></div>

当我像下面这样尝试与本地导入文件相同时,它不起作用

<script src="${pageContext.servletContext.contextPath}/resources/js/exporting.js"></script>
<script src="${pageContext.servletContext.contextPath}/resources/js/highcharts-more.js"></script> 
<script src="${pageContext.servletContext.contextPath}/resources/js/highcharts.js"></script>

以下是我遇到的错误

是否可以在本地使用,或者如果我将这些文件保存在我的服务器中,会有帮助吗。

我认为加载库时的顺序很重要。试试这个:

   <script src="${pageContext.servletContext.contextPath}/resources/js/highcharts.js"></script>
  <script src="${pageContext.servletContext.contextPath}/resources/js/highcharts-more.js"></script> 
    <script src="${pageContext.servletContext.contextPath}/resources/js/exporting.js">    </script>