jqplot繪制表格備註及配置
阿新 • • 發佈:2017-08-18
樣式 distrib border con 6.0 cor fontsize tex fun
<!DOCTYPE html>
<html>
<head>
<title>jqplot</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link class="include" rel="stylesheet" type="text/css" href="../jquery.jqplot.min.css"/>
<link rel="stylesheet" type="text/css" href="examples.min.css"/>
<link type="text/css" rel="stylesheet" href="syntaxhighlighter/styles/shCoreDefault.min.css"/>
<link type="text/css" rel="stylesheet" href="syntaxhighlighter/styles/shThemejqPlot.min.css"/>
<!--[if lt IE 9]>
<script language="javascript" type="text/javascript" src="../excanvas.js"></script><![endif]-->
<script class="include" type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<div class="colmask leftmenu">
<div class="colleft">
<div class="col1" id="example-content">
<hr style="color: #9d261d;border: solid 2px">
<div id="dayu" style="width: 600px;height: 400px;"></div>
<pre class="code prettyprint brush:js"></pre>
<script class="code" type="text/javascript">
$(document).ready(function () {
var s1 = [[2009, 3.5], [2010, 4.4], [2011, 6.0], [2012, 9.1], [2013, 12.0], [2014, 14.4]];
var list1 = [[[1, 2], [3, 5.12], [5, 13.1], [7, 33.6], [9, 85.9], [11, 219.9]]];
var list2 = [[[0, 2], [2, 5.12], [4, 13.1], [6, 33.6], [8, 85.9], [10, 219.9]]];
$.jqplot("dayu", list2, {
//標題
title: {
text: ‘dayuShow‘,//標題名
fontFamily: ‘Times New Roman‘,//字體樣式
fontSize: ‘66px‘,//字體大小
textAlign: ‘right‘//靠齊
, textColor: ‘red‘//標題顏色
},
//系列(陣列)
series: [
{
color: ‘#7b2b64‘,//點(線)的顏色
showLine: true//默認顯示連線,false:不顯示
, shadow: true//默認顯示陰影,false:不顯示
, showMarker: true//默認顯示數據點,false不顯示點
, drawGridLines: false
}
],
//對象
axes: {
yaxis: {min: -10, max: 240},//y軸最低最高值
// renderer: $.jqplot.CategoryAxisRenderer
renderer: $.jqplot.LogAxisRenderer,
tickDistribution: ‘power‘
, showTicks: true
, showTickMarks: false
, numberTicks: 200
}
//柵格設置
, grid: {
shadow: true //柵格陰影
, borderWidth: 1.0 //邊框粗細
, gridLineWidth: 0.5 //裏面柵格線條的粗細
, gridLineColor: ‘#698396‘//柵格顏色
, drawGridlines: true //是否顯示柵格,默認顯示
,background: ‘#f9c50b‘ //柵格背景顏色
}
});
var grid = {
gridLineWidth: 1.5,
gridLineColor: ‘#7b2b64‘,
drawGridlines: true
};
});
</script>
<!-- End example scripts -->
<!-- Don‘t touch this! -->
<script class="include" type="text/javascript" src="../jquery.jqplot.min.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shCore.min.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJScript.min.js"></script>
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushXml.min.js"></script>
<!-- End Don‘t touch this! -->
<!-- Additional plugins go here -->
<script language="javascript" type="text/javascript" src="../plugins/jqplot.barRenderer.min.js"></script>
<script language="javascript" type="text/javascript"
src="../plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script language="javascript" type="text/javascript"
src="../plugins/jqplot.canvasTextRenderer.min.js"></script>
<script language="javascript" type="text/javascript"
src="../plugins/jqplot.canvasAxisTickRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="../plugins/jqplot.canvasOverlay.min.js"></script>
<!-- End additional plugins -->
<link rel="stylesheet" type="text/css" href="jquery.jqplot.css"/>
<!--[if IE]>
<script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="jquery.jqplot.min.js"></script>
<script language="javascript" type="text/javascript" src="jqplot.logAxisRenderer.js"></script>
</div>
</div>
</div>
<script type="text/javascript" src="example.min.js"></script>
</body>
</html>
jqplot繪制表格備註及配置