gpt4 book ai didi

css - Highcharts - 如何更改字体大小?

转载 作者:太空宇宙 更新时间:2023-11-03 23:29:45 24 4
gpt4 key购买 nike

我需要在 highchart 上更改云中的字体大小。怎么做?

HTML:

<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>

JavaScript:

$(function () {
$('#container').highcharts({
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
title: {
style: {
color: '#FF00FF',
fontWeight: 'bold'
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
});

JSFiddle:http://jsfiddle.net/autrmg62/

屏幕:

Screen

最佳答案

Working example

第 4-12 行使用了我的自定义代码。

tooltip: {
shared: true,
useHTML: true,
headerFormat: '<span style="font-size: 20px; color: red;">{point.key}</span><br/>',
style: {
fontWeight: 'bold',
fontSize: '13px'
}
},

您想要的元素样式是通过 headerFormat 完成的,并在 style=""

中指定您想要的样式

看看: Highchart API reference

关于css - Highcharts - 如何更改字体大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25710814/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com