2015-11-04 64 views

回答

0

你看着十字星? http://api.highcharts.com/highcharts#xAxis.crosshair

我不知道,如果它不正是你要尋找的效果,但它是非常接近:

xAxis: { 
    categories: ['17', '18', '19', '20', '21', '22', '23'], 
    gridLineWidth: 1, 
    min: 0, 
    opposite: true, 
    tickWidth: 0, 
    crosshair: { 
     width: 75, 
     color: 'blue', 
     zIndex: 0 
    } 
} 

https://jsfiddle.net/rn1t0uq3/2/

+0

THX的答案, 十字佔據了整個高度,高度限制在這裏點 – Almagest13

+0

這個例子,不是懸停... http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/ highcharts/series/color-zones-zoneaxis-x/ 和使用日期 – Almagest13

+0

所以你需要將矩形放在backogrund中或只在xAxis上放置(如截圖中所示)? –