2016-02-29 148 views
0

我在找jquery flot。我想隱藏標籤x-axis但我想保留vertical axis隱藏標籤x軸,但仍然保持垂直軸jquery flot

這裏我演示代碼:my demo

這裏我的照片我的預期(刪除所有拉布勒x-axis)。 enter image description here

希望大家能幫助我。非常感謝你。

更新

我更新了我的代碼labelWidthlabelHeight,但它仍然出現。

xaxis: { 
    mode: "time", 
    timezone: "browser", 
    ticks: 6, 
    labelWidth: 0, 
    labelHeight: 0, 
    ticks: [ 
    now_hour, 
    now_hour + 3600000*1, 
    now_hour + 3600000*2, 
    now_hour + 3600000*3, 
    now_hour + 3600000*4, 
    now_hour + 3600000*5, 
    now_hour + 3600000*6 
    ], 
    timeformat: "%H:%M" 
} 

更新:遵循占星的答案。它也起作用。

我們只是更新css

.tickLabels .xAxis { 
color:transparent !important; 
} 
+0

查找labelHeight和labelWidth文檔中,如果將這些零它不應該出現。 – Peter

+0

感謝您的回覆,我更新了您的建議,但仍然出現。 –

回答

2

添加到.css文件:

.tickLabels .xAxis { 
    color:transparent !important; 
} 

jsFiddle

+0

感謝您的回答,標籤'x軸'沒有出現,但'垂直軸'沒有出現。我想顯示「垂直軸」。 –

+1

然後使用css屬性: .tickLabels .xAxis顏色:transparent!important; } 我更新了一個小提琴。看[鏈接](http://jsfiddle.net/HellLena/mb3gn9Lv/22/) – Stargazer

+0

是的,你的解決方案是偉大的。我想你應該更新你的答案,我會投票你的答案,這是偉大的。再一次,非常感謝。 –