日期:2014-05-16  浏览次数:20322 次

关于highchart【续】
额、、、 为什么连打酱油的都没。。。   
这个fomatter 可以达到效果

  formatter: function () {
                                if (this.value < parseInt(data.time[0][0].replace("/Date(", "").replace("+0800)/", ""), 10)) {
                                    //按照比例获取数据源中的元素

                                    var width = $("#container").width();//获取宽度
                                    var a = Math.round(width / this.value);
                                    var b = Math.round(data.time[0].length / a);
                                    var c;
                                    if (data.time[0][b] == undefined) {
                                        c = ChangeDateFormat(data.time[0][data.time[0].length - 1]);
                                    }
                                    else {
                                        c = ChangeDateFormat(data.time[0][b]);
                                    }
                                    date = c;
                                    var month = date.getMonth() + 1 < 10 ? "0" +&n