HighCharts API文档地址:https://api.hcharts.cn/
官方甘特图Demo地址:https://code.hcharts.cn/jianshukeji/hhhG2T
干货:
前端页面:
兼容ie主要是使用:
1、<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
2、ie版本中数据在没有引号的情况下使用
seriesData[i].x = parseInt(seriesData[i].x);
seriesData[i].x2 = parseInt(seriesData[i].x2);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="icon" href="https://static.jianshukeji.com/hcode/images/favicon.ico">
<style>
#container {
min-width: 300px;
max-width: 800px;
/*height: 300px;*/
/*width: 60%;*/
height: 100%;
margin: 1em auto;
}
</style>
<script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
<script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
&