关于highchart【续】,该怎么处理
关于highchart【续】
额、、、 为什么连打酱油的都没。。。
这个fomatter 可以达到效果
额、、、 为什么连打酱油的都没。。。
这个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" + (date.getMonth() + 1) : date.getMonth() + 1;
var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();