2011-11-10 4 views

답변

26

실제로 은 flot을 사용하여 생성합니다.

var options = { 
    series: { 
     bars: { 
      show: true, 
      barWidth: 15778463000, // 1/2 year in milliseconds 
      align: 'center' 
     }, 
    }, 
    yaxes: { 
     min: 0 
    }, 
    xaxis: { 
     mode: 'time', 
     timeformat: "%y", 
     tickSize: [1, "year"], 
     autoscaleMargin: .10 // allow space left and right 
    } 
}; 

$(function() { 
    $.plot($('#placeholder'), [[[1230768000*1000, 100], //[seconds * 1000 = milli, y value] 
           [1262304000*1000, 200], 
           [1293840000*1000, 300]]], options); 
}); 

는 생산 :

enter image description here

+0

은'barWidth' 속성은 나를 위해 속임수를 썼는지! –

관련 문제