1
Q
配置背景標籤
A
回答
1
從版本1.7,有一個新的選擇bgMarks
:
bgMarks: {
count: 0, // number of value labels to write in the background of the bar
interval: Infinity, // provide instead of count to specify the space between labels
label: id // string or function to write as the text of a label. functions are called with normalised values.
}
您的使用情況下,您會希望(假設你使用Moment.js):
bgMarks: {
count: 4,
label: function(val) {
return moment(val).format('HH:mm');
}
}
+0
我只想補充一點,看起來項目的GitHub頁面上的API描述是不正確,實際屬性名稱是'bgMark',而不是複數'bgMarks'。您可以在https://github.com/quarterto/Elessar/blob/develop/dist/elessar.js#L506上的源代碼中自行查看 –
相關問題
- 1. 點擊標籤和背景變化(不是標籤的背景)
- 2. 圖像標籤中的背景位置
- 3. 如何設置標籤背景顏色
- 4. Matplotlib colorbar背景和標籤放置
- 5. 如何設置MyEclipse關於匹配背景標籤的顏色
- 6. CSS背景配置
- 7. 給標籤背景顏色
- 8. 標籤背景顏色gwt
- 9. 爲div標籤分配背景顏色不會改變div標籤內部元素的背景
- 10. 更改背景虛化標籤標註
- 11. 鼠標並更改背景標籤
- 12. 無法將tableview背景和標籤背景設置爲相同的顏色?
- 13. CSS背景位置座標
- 14. 1個標籤中的背景圖像和背景
- 15. 爲什麼身體背景圖像覆蓋HTML標籤背景?
- 16. 標籤背景中的問題
- 17. 如何製作視頻標籤背景?
- 18. 背景圖片爲<a>標籤
- 19. Div標籤/背景不居中
- 20. 周邊div標籤不適背景色
- 21. 問題與背景顏色L1標籤
- 22. 更改Raphael「標籤」的背景顏色
- 23. 如何更改標籤背景?
- 24. 背景圖像溢出標籤
- 25. UITableViewCell中的標籤阻擋背景
- 26. 標籤背景不會去透明
- 27. R Tree-maps - 使標籤背景透明
- 28. Openlayers 3功能標籤背景
- 29. 標籤和按鈕不在背景中
- 30. 邊框和html標籤的背景
能告訴你你現在有什麼? –
如果我設置參數bgLabels:4,出現背景標籤(在這種情況下爲4),但格式爲YYYY-MM-DD HH:SS – esteban