//动态更新图表数据
function getData() {
    var categories = [];
    $.ajax({
        type: "post",
        url: "../../ashx/statisPage/XX.ashx",
        dataType: "json",
        success: function (data) {
            var d = [];
            $(data).each(function (n, item) {
                d.push(item.avgValue);
                categories.push(item.sDate);
            })
            loadContainer(d, categories);
        }
    });
}
//数据图表展示
function loadContainer(d, categories) {
    var chart;
    chart = chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container',
            type: 'column'
        },
        title: {
            text: ‘1231212’,
            x: -20 //center
        },
        subtitle: {
            text: 'Source: WorldClimate.com',
            x: -20
        },
        xAxis: {
            categories: []
        },
        yAxis: {
            title: {
                text: '渗流量 (m)'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },credits: {
            enabled : false
        },
        tooltip: {
            valueSuffix: 'm'
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: ‘45454545’,
            data: []
        }]
    });
    //chart.addSeries({data:[]});
    chart.series[0].setData(d);
    chart.xAxis[0].setCategories(categories);
}