[英]HighCharts organization diagram font size
我無法在組織結構圖中設置字體大小,我想在“em”單元中,因為在移動設備上看起來不太好。
我已經嘗試過:
Highcharts.chart('container', {
chart: {
height: 600,
inverted: true
},
title: {
text: 'Highcharts Org Chart'
},
dataLabels: {
style: {
fontSize: '30px'
}
},
series: [{
type: 'organization',
name: '',
keys: ['from', 'to'],
data: [
['Shareholders', 'Board'],
['Board', 'CEO'],
['CEO', 'CTO'],
['CEO', 'CPO'],
['CEO', 'CSO'],
['CEO', 'CMO'],
['CEO', 'HR'],
['CTO', 'Product'],
['CTO', 'Web'],
['CSO', 'Sales'],
['CMO', 'Market']
],
levels: [{
level: 0
dataLabels: {
style: {
fontSize: '30px'
}
}
}],
dataLabels: {
style: {
fontSize: '30px'
}
}
}]
})
任何想法?
另一個 styles 像“color”或“fontFamily”確實有效
為每個特定級別定義或為整個系列定義的fontSize
工作正常,即使使用em
單位。
演示: https://jsfiddle.net/BlackLabel/voz3btL1/
levels: [{
level: 0,
dataLabels: {
style: {
fontSize: '4em'
}
}
}],
API: https://api.highcharts.com/highcharts/series.organization.dataLabels.style.fontSize
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.