gpt4 book ai didi

javascript - 我需要安装任何东西来运行 Highchart 吗?

转载 作者:行者123 更新时间:2023-11-30 16:26:35 24 4
gpt4 key购买 nike

我正在编写一个简单的程序,它将打印 highchart 但只得到一个空白页。

我的代码:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="Highcharts-2.2.2/js/highcharts.js"></script><script type="text/javascript">$(document).ready(function()var options={chart:{renderTo:'container',type:'spline'},title:{text:'survey data'},subtitle:{text:'from survey form'},
xAxis:{categories:['Jan 2008','Feb 2008','March 2008','April 2008','May 2008'],tickInterval:3},
yAxis:{title:`text:'Percentage %'},min:0
},plotOptions:{series:{lineWidth:2}},series:[{name:'Internet Explorer',data:[54.7,54.7,53.9,54.8,54.4,60.1,64.3,66.1]},{name:'FireFox',data:[36.7,36.1,37.0,39.1,39.8,40.1,43.7]},{name:'Safari',data:[1.9,2.0,2.1,2.2,2.4,2.6,2.8]},{
name:'Opera',data:[1.4,1,4,1.4,1.4,1.4,1.5,1.7,1.9]}]});});
</script>
</head>
<body>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"> </div>
</body>
</html>

我在 XAMPP 上将其作为 localhost/folder_name/file_name.php 运行

最佳答案

我想你已经设置了 HighChart 选项,但我没有看到任何初始化代码,你可能想在你的代码中加入这样的东西

chart = new Highcharts.Chart(options);

关于javascript - 我需要安装任何东西来运行 Highchart 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34056235/

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