`

【jqPlot】jqPlot柱状图

 
阅读更多

1)首先引入必须的js和css文件

<link href="<%=contextPath %>/lib/jqplot/jquery.jqplot.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/jquery.min.js"></script>
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.pieRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.logAxisRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.barRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.enhancedLegendRenderer.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.highlighter.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.pointLabels.min.js"></script>  
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.cursor.min.js"></script> 
<script type="text/javascript" src="<%=contextPath %>/lib/jqplot/plugins/jqplot.dragable.min.js"></script> 

 

 

2)在body上定义一个div容器

 

<body>  
   <div id="chartContainer"/>  
</body>  

 

 

3)柱状图

  //构造数据
   var date = [['2014-07-01',1],['2014-07-02',2],['2014-07-03',3],['2014-07-04',4],['2014-07-05',5],['2014-07-06',6],['2014-07-07',7]];
  //构造柱状图chart
   $.jqplot('chartContainer', [date], {  
        title : '柱状图',  
        seriesDefaults : {  
            renderer : jQuery.jqplot.BarRenderer,  
            rendererOptions : {  
              barMargin : 20, //柱子间的外间距
                animation: {  
                    show: true  
                }  
            },  
            pointLabels : {  
                show : true  
            }  
        },  
        axesDefaults : {  
            tickRenderer : jQuery.jqplot.CanvasAxisTickRenderer,  
            tickOptions : {  
                angle : 0  
            }  
        },  
        axes : {  
            xaxis : {  
                renderer : jQuery.jqplot.CategoryAxisRenderer  
            },  
            yaxis : {  
                tickOptions : {  
                    angle : 0  
                }  
            }  
        },  
        legend : {// Date series title  
        	renderer : jQuery.jqplot.EnhancedLegendRenderer,
            show : true,  
            location : 'ne',  
            placement : 'inside'
        }  
    });

  

 

  • 大小: 8.6 KB
分享到:
评论

相关推荐

    jqplot柱状图示例

    jqplot柱状图示例,加鼠标移动,示例+JS

    jqplot柱状图、饼形图、折线图

    jqplot 柱状图源代码、饼形图源代码、折线图源代码

    jqplot折线图和柱状图

    一个通过jqplot完整的生成折线图和柱状图例子

    使用jQuery jqPlot插件绘制柱状图

    主要介绍了使用jQuery jqPlot插件绘制柱状图,需要的朋友可以参考下

    简单jQplot创建引擎(支持线图/饼图/柱状图)

    简单jQplot创建引擎(支持线图/饼图/柱状图) http://blog.csdn.net/wtderek/article/details/22885939

    jqplot绘图工具

    jqPlot是一个jQuery绘图插件,可以利用它制作漂亮的线状图、柱状图和饼图。jqPlot支持为图表设置各种不同的样式。提供Tooltips,数据点高亮显示等功能。

    jquery.jqplot 绘图插件

    插件描述:jqPlot是一个jQuery绘图插件,可以利用它制作漂亮的线状图、柱状图和饼图。参考示例:http://www.jq22.com/jquery-info5115

    jqplot (基于jquery的免费的图表工具)

    jqplot ,图表,jquery,曲线图,柱状图,可能用于生成图表,方便面使用,里面有例子

    jquery jqPlot API 中文使用教程

    jqPlot是一个jQuery绘图插件,可以利用它制作漂亮的线状图、柱状图和饼图。jqPlot支持为图表设置各种不同的样式。提供Tooltips,数据点高亮显示等功能。主要功能包括[1]: 1、有多种图表样式可供选择 2、可以自定义...

    jQuery插件:jqplot图表绘制插件详解

    jqplot是一个十分强大的jQuery绘制图表的插件,支持折线图、柱状图、饼图等等多种形态。

    jqplot1.0.4

    强大的图表制作功能.饼状图,柱状图,线状图等

    jqplot基于jquery的报表制作组件

    qPlot是一个jQuery绘图插件,可以利用它制作漂亮的线状图、柱状图和饼图。jqPlot支持为图表设置各种不同的样式。提供Tooltips,数据点高亮显示等功能。 主要功能包括[1]: 1、有多种图表样式可供选择 2、可以自定义...

    jqPlot报表插件使用方法

    jqPlot支持为图表设置各种不同的样式,提供Tooltips,数据点高亮显示等功能柱状图可以提供坐标轴定制、柱条宽度、颜色定制和阴影设置等等。目前jqPlot支持大部分主流的浏览器,包括:IE 7、IE 8、Firefox、Safari、...

    jqPlot jQuery绘图插件的使用

    jqPlot是一个灰常强大的图表工具,曲线,柱状,饼图,应该有尽有,更要命的是,调用方便~~

    jqPlot报表参数

    jqPlot 图形报表插件简介及参数详解(jquery) 前边也讲过一个基于java的图形...通过jqPlot可以再网页中绘制线状、柱状、饼状等多种样式图表。而且,jqPlot具有插件可扩展性(Pluggability),你可以编写自己的图表样式。

    jqPlot-扩展性极强的jQuery图表插件

    jqPlot是一款通用的、扩展性极强的jQuery图表插件。jqPlot拥有一套完整的图表系统,各种类型的图表如:柱状图、饼状图、线性图等样样俱全。

    jqPlot jquery的页面图表绘制工具

    jqplot是基于一个基本的jqplot.js文件,并有多个js文件支持的插件——也就是说jqplot.js文件只能支持线状图的绘制,对于饼状图,柱状图等图形需要引入pieRenderer.js等文件。 这里参照jqPlot的官方文档,以饼状图为...

    jquery.jqplot.1.0.4r1121.zip

    一个功能强大的基于jquery的画曲线图,柱状图,饼图的插件

Global site tag (gtag.js) - Google Analytics