<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></meta>
<script src="C:/Users/Fernando/Desktop/jquery-1.8.2.min.js"></script>
<script src="C:/Users/Fernando/Desktop/Highcharts-4.0.1/js/highcharts.js"></script>
<script>
$(function () {
$('#container').highcharts({ //图表展示容器,与div的id保持一致
chart: {
type: 'column' //指定图表的类型,默认是折线图(line)
},
title: {
text: 'My first Highcharts chart' //指定图表标题
},
xAxis: {
categories: ['fd1', 'sc2', ] //指定x轴分组
},
yAxis: {
title: {
text: 'something' //指定y轴的标题
}
},
series: [{ //指定数据列
name: '1', //数据列名
data: [1, 4,] //数据
}, {
name: '2',
data: [5, 3]
},{
name:'3',
data:[4,8]
}
]
});
});
</script>
<body>
<div id="container" style="min-width:800px;height:400px"></div>
</body>
如果想要动态更新衡中坐标,我个人的做法是将该文件导成String 字符串,再用字符串的replace()方面将相应的新的数据替换掉
</html>