[英]How to add tooltip in chart for x category field label in EXTJS 6.5.x
1.造型
盡管受到限制,但可以將樣式添加到圖表標簽。 完整選項在這里。
示例(在本文檔小提琴中測試):
axes: { type: 'category', position: 'bottom', fields: ['name'], label: { rotation: 270, color: 'red' }, title: { text: 'Sample Values', fontSize: 15 } },
2. 工具提示
要將工具提示添加到您的標簽,您可以執行以下操作:
(編輯代碼片段以滿足您的需要)
renderer: function(item, label, lastLabel) { var trimmedLabel = Ext.util.Format.ellipsis(label, 15); return Ext.String.format("<div data-qtip="{0}">{1}</div>", label, trimmedLabel); }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.