1.柱状图
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Flot Examples</title>
<link href="layout.css" rel="stylesheet" type="text/css">
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="../jquery.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
</head>
<body>
<h1>Flot Examples</h1>
<div id="placeholder" style="width:600px;height:300px"></div>
<p>Flot supports lines, points, filled areas, bars and any
combinations of these, in the same plot and even on the same data
series.</p>
<script type="text/javascript">
$(function () {
var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
var d3 = [[1, 2], [2, 4], [3, 3], [5, 6]];
var opts = {
yaxes:[{show:true, //是否显示坐标轴,必须是grid.show==true时才生效
max:20, //最大值
min:0, //最小值
tickSize:1, //刻度单位,(max-min)/tickSize就可算出坐标轴上有多少个刻度
position:'left' //坐标轴在那边,左侧,右侧,上,下
}],
xaxes:[{show:false, //是否显示坐标轴,必须是grid.show==true时才生效
max:10, //最大值
min:0, //最小值
tickSize:1, //刻度单位,(max-min)/tickSize就可算出坐标轴上有多少个刻度
}]
};
$.plot($("#placeholder"), [
{
color:'green',
label:'a',
data: d2,
bars: { show: true,fillColor:"green" }
},
{
color:'blue',
label:'b',
data: d3,
bars: { show: true,fillColor:"blue" }
}
],opts);
});
</script>
</body>
</html>
- 大小: 46.5 KB
分享到:
相关推荐
JQuery Flot 画图插件 +实例源码 使用非常方便,效果非常漂亮
在这个例子中,实现了通过配置文件控制图形种类,动态插入数据实现flot画图
基于jquery的folt画图插件,主要是堆栈图,以及当时间为X轴或者Y轴时,时间处理
主要用于web开发式在网页上进行图表的绘制
Js 绘图 Flot 示例!提供给同学们学习!
有flot官网所有资料,包括demo,所有js以及中文翻译后的flot API,完全支持jQuery,简单易学,图形丰富充实,可作为商用。
jquery.flot.axislabels.js
jQuery flot API文档 中文版(经整理,里面有相关参数说明,对使用jQuery flot进行图表开发有帮助)
angular-flot, angular.js 和Flot图表库之间的绑定 角 flot 包装Flotcharts的一个 Angular 指令。安装这里库是作为 Bower 组件和NPM模块提供的:Bower: bower install angular-flotnpm install
前端项目-flot.tooltip,用于Flot图表的易于使用的工具提示
flot 0.83 jquery 图表
flot-柱形图,自己用的flot-柱形图
Flot类库基于jQuery,支持绘制实时和可进行交互的图表
Flot是Ole Laursen开发的基于JQuery的纯JavaScript实现的绘图库,Flot使用起来非常简单,绘图效果相当绚丽,而且还支持一些图片的操作功能,例如图片的缩放。
jquery.flot.time.js
flot jquerUI的一系列的集合 功能强大哇,使用的是最新的jquery库
0.8.1稳定版本,demo更多,增加了柱状图,学习或者使用画图工具的不要错过哦!
基于jquery的图表插件, highChart,jschart,flot
jQuery flot 0.5jar包,是一个新兴的js框架,加快js在html中的编码,使js与html分离