`

hcharts视图报表

 
阅读更多
function queryloginUser()
{
//报表图
  var loginStartTime=$("#loginStartTime").datebox("getValue"); 
  var loginEndtime=$("#loginEndtime").datebox("getValue");
  var SOURCE =$('#SOURCE').val();
if(loginStartTime=="" || loginEndtime=="")
return;

$.post(JsUtils.getRootPath()+'/report/queryLoginUser.do',{loginStartTime:loginStartTime,loginEndtime:loginEndtime,SOURCE:SOURCE},function(data){

var arrayDate = new Array();//日期
var arrayNum1 = new Array();//小自播数量
var ds;
for (var i = data.length-1; i >=0 ; i--)
{
ds=new Date(data[i].LOGIN_TIME).format("yyyy/MM/dd");
arrayDate.push(ds);
arrayNum1.push(data[i].num);
}
//报表表格图-over
$('#dbgrid2').highcharts({
exporting: {
            enabled:false
},
    lang:{ //中文
    printChart:getLanValue_("report_PrintingCharts"),
            downloadJPEG: getLanValue_("report_DownloadJPGpicture"), 
            downloadPDF: getLanValue_("report_DownloadPDF")  ,
            downloadPNG: getLanValue_("report_DownloadPNGImage"), 
            downloadSVG: getLanValue_("report_DownloadSVGVector") ,
            exportButtonTitle: getLanValue_("report_ExportPictures")
    },
        title: {
            text: getLanValue_("report_UserLogin"),
            x: -20
        },
        subtitle: {
            text: '',
            x: -20
        },
        xAxis: {
            categories:arrayDate
        },
        yAxis: {
            title: {
                text: getLanValue_("report_shenheren")
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        tooltip: {
            valueSuffix: getLanValue_("report_people")
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: getLanValue_("report_loginUser"),
            data: arrayNum1
        }]
    });

});
  }

详细的演示api:http://www.hcharts.cn/demo/index.php?p=10
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics