以下JS Fiddle显示应用于某些单词的字体样式。 示例:https://jsfiddle.net/amrutaJgtp/7evd8tgo/5/
recurrence(100)
我在Highcharts中试过这个。但它没有用。 示例:https://jsfiddle.net/amrutaJgtp/7evd8tgo/6/
{
"text": "UNKNOWN",
"count": 584,
"color": 'green',
"style": {
fontFamily: 'Harrington',
fontWeight: 1200 //font weight has no effect
}
}, {
"text": "OTHER",
"count": 138,
"color": 'red',
"style": {
fontFamily: 'sans - serif',
fontWeight: 1200 //font weight has no effect
}
}
有没有办法对某些单词应用不同的字体样式?
答案 0 :(得分:0)
API 没有说明 wordcloud系列的style
属性点:IFileProvider.GetFileInfo documentation
您可以改为使用className
:
<强> JS:强>
var data = [{
"name": "LANDING",
"weight": 18022,
className: 'custom-point'
},
(...)]
<强> CSS:强>
.custom-point {
font-family: Harrington !important
}
现场演示: https://api.highcharts.com/highcharts/series.wordcloud.data