继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

JQplot 学习画线性图一

代码写到手抽筋
关注TA
已关注
手记 294
粉丝 26
获赞 113

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
 <link rel="stylesheet" type="text/css" href="../jquery.jqplot.css" />
  <link rel="stylesheet" type="text/css" href="examples.css" />
  <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
 
  <!-- BEGIN: load jquery -->
  <script language="javascript" type="text/javascript" src="../jquery-1.5.1.min.js"></script>

  <!-- END: load jquery -->
 
  <!-- BEGIN: load jqplot -->
  <script language="javascript" type="text/javascript" src="../jquery.jqplot.js"></script>
 <script language="javascript" type="text/javascript" src="../plugins/jqplot.logAxisRenderer.js"></script>
 <script language="javascript" type="text/javascript" src="../plugins/jqplot.canvasTextRenderer.js"></script>
 <script language="javascript" type="text/javascript" src="../plugins/jqplot.canvasAxisLabelRenderer.js"></script>
 <script language="javascript" type="text/javascript" src="../plugins/jqplot.canvasAxisTickRenderer.js"></script>
 <script language="javascript" type="text/javascript" src="../plugins/jqplot.dateAxisRenderer.js"></script>
 <script language="javascript" type="text/javascript" src="../plugins/jqplot.categoryAxisRenderer.js"></script>
 <script language="javascript" type="text/javascript" src="../plugins/jqplot.barRenderer.js"></script>
 
 <style type="text/css">
   .jqplot-point-label {white-space: nowrap;}
      .jqplot { margin: 70px;}
 </style>
 
 <script type="text/javascript" language="javascript">
  $(document).ready(function(){
  //把线附加在div的id为chartdiv上, 后面接的是描点坐标
  $.jqplot('chartdiv',[[[1, 2],[3,5.12],[5,13.1],[7,33.6],[9,85.9],[11,219.9]]],
     {title:'my first demol',//图片的标题
      axes:{yaxis:{renderer: $.jqplot.LogAxisRenderer}},//是否要渲染图形
      series:[{color:'green'}] //给线加颜色
     }
    );
  });
</script>

</head>
<body>  
 <div id="chartdiv" ></div>
</body>
</html>

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP