1、调用CSS样式:
<link rel="stylesheet" type="text/css" href="css/style.css" />
2、调用JS插件代码:
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jsapi.js"></script>
<script type="text/javascript" src="js/corechart.js"></script>
<script type="text/javascript" src="js/jquery.gvChart-1.0.1.min.js"></script>
<script type="text/javascript" src="js/jquery.ba-resize.min.js"></script>
3、添加HTML代码:
将
<!--效果html开始-->......
<!--效果html结束-->之间的html和js代码;放在<body></body>之间。
4、JS实例代码:
<script type="text/javascript">
gvChartInit();
$(document).ready(function(){
$('#myTable5').gvChart({
chartType: 'PieChart',
gvSettings: {
vAxis: {title: 'No of players'},
hAxis: {title: 'Month'},
width: 600,
height: 350
}
});
});
</script>
<script type="text/javascript">
gvChartInit();
$(document).ready(function(){
$('#myTable1').gvChart({
chartType: 'PieChart',
gvSettings: {
vAxis: {title: 'No of players'},
hAxis: {title: 'Month'},
width: 600,
height: 350
}
});
});
</script>