码迷,mamicode.com
首页 > Web开发 > 详细

前台强大的图表(js)

时间:2014-06-23 06:11:56      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:class   http   tar   ext   color   com   

http://www.jqplot.com/ 网址,自己下载下例子看一下就明白了。

  这个是我之前做的项目中的例子(仅是部分代码):

function publicMethod(){
            
             var plot1 = $.jqplot(chart, [currYear], {
                 seriesColors: ["rgb(23, 108, 238)"],
                 title: titles,
                  highlighter: {
                     show: true,
                     sizeAdjust: 1,
                     tooltipOffset: 9
                 },
                 grid: {
                     background: ‘rgba(57,57,57,0.0)‘,
                     drawBorder: false,
                     shadow: false,
                     gridLineColor: ‘#666666‘,
                     gridLineWidth: 1
                 },
                 legend: {
                     show: true,
                     placement: ‘outside‘
                 },
                 series: [
                     {
                         label: visits
                     }
                 ],
                 axes: {
                     xaxis: {
                         renderer: $.jqplot.DateAxisRenderer,
                          tickRenderer: $.jqplot.CanvasAxisTickRenderer,
                         tickOptions: {
                             formatString: "%b %e",
                             angle: -30,
                             textColor: ‘#333333‘
                         },
                         min: start_array,
                         max: end_array,
                         tickInterval: distance,
                          drawMajorGridlines: false
                     },
                 },
             });

               $(‘.jqplot-highlighter-tooltip‘).addClass(‘ui-corner-all‘);  
        }

返回的数据类型在上面链接中就有,有很多不同样式的图表。

 

前台强大的图表(js),布布扣,bubuko.com

前台强大的图表(js)

标签:class   http   tar   ext   color   com   

原文地址:http://www.cnblogs.com/sm-hl/p/chihuo.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!