如果文本太长,则从头开始显示highcharts节点文本 [英] show highcharts node text from beginning if the text is to long
问题描述
如果highchart节点中的文本长于该节点,则仅显示部分文本.没关系但是,如何始终显示文本的开头?
If the text in the highchart node is longer than the node only a part of the text is displayed. This is okay. But how can I show allways the beginning of the text?
我试图将verticalAlign设置为top,但这只会将显示的文本推到节点的顶部,而不会显示文本的其他部分.
I tried to set verticalAlign to top but this pushes only the displayed text to the top of the node and don't show a other part of the text.
它是具有
title:Merkmale |Makro zurPrüfung描述:[MORE.OAI] Office AddIn
(370/454,6)
CR:OfficeAddin/DMS-AddIn用于MS-Outlook,MS-Excel和MS-Word [OAI]
(/449,1)
title: Merkmale | Makro zur Prüfung
description: [MORE.OAI] Office AddIn
(370/454,6)
CR: OfficeAddin/DMS-AddIn für MS-Outlook, MS-Excel und MS-Word [OAI]
(/449,1)
它显示
(370/454,6)CR:用于MS-Outlook的OfficeAddin/DMS-AddIn
(370/454,6) CR: OfficeAddin/DMS-AddIn für MS-Outlook,
但它应该显示
默克马累(Merkmale)|Makro zurPrüfung[MORE.OAI] Office插件
Merkmale | Makro zur Prüfung [MORE.OAI] Office AddIn
示例代码https://jsfiddle.net/omurx8Lk/4/
推荐答案
您可以使用 dataLabels.nodeFormat
来控制应显示的数据标签.默认情况下,dataLabel显示描述(优先级高于名称)或名称.
You can use the dataLabels.nodeFormat
to control what data label should display. By default dataLabel displayed the description (has higher priority than name) or name.
演示: https://jsfiddle.net/BlackLabel/r5hq2uds/
{
"id": "17698",
"name": "Merkmale | Makro zur Prüfung",
"color": "#AAAAAA",
"description": "[MORE.OAI] Office AddIn<br/>(370/454,6)<br/>CR: OfficeAddin/DMS-AddIn für MS-Outlook, MS-Excel und MS-Word [OAI]<br/>(/449,1)",
dataLabels: {
nodeFormat: '{point.name}'
}
},
API: https://api.highcharts.com/highcharts/plotOptions.organization.dataLabels.nodeFormat
这篇关于如果文本太长,则从头开始显示highcharts节点文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!