日期:2014-05-17  浏览次数:20456 次

Jquery Highcharts插件动态加载数据问题~~~~~
 请问下大家categories怎么用ajax动态加载数据 下面是我写的数据能拿到就是Y轴显示的时候没有数据 

$(function () {
        var item; 
        $.ajax({
            type: "post",
            url: "/Monitor/Day/", 
            success: function (data) {
                if (data != "") {
                    item = data.split(',');
                    alert(item);
                    //chart.xAxis.categories = [item];
                    //alert(chart.xAxis.categories); 
                }
            }
        });
        var chart = Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'column'
            },
            title: {
                text: 'Used Space C,D,E,F:Lable Data'
            },
            subtitle: {
                text: 'Source: WorldClimate.com'
            },
            xAxis: {
                categories: item