jqplot绘制表格备注及配置

Posted 大宇007

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jqplot绘制表格备注及配置相关的知识,希望对你有一定的参考价值。

<!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绘制表格备注及配置的主要内容,如果未能解决你的问题,请参考以下文章

在 jqplot 图表中绘制 x ax 具有日期格式的垂直线

jqplot:“this.proxy.getTime不是函数”/日期输入解析器?

dateaxisrender jqplot xticks 宽度不一致

jqplot配置参考

图标插件--jqplot实现柱状图及饼图,表盘图演示样例

带有constrainTo的jqPlot - 获取拖动点值