6
我使用的是pie Highchart.js插件,我正在尝试更改某些包含百分比类型的标签的字体属性。如何更改饼图高图中的字体属性?
我试过,但没有工作... http://tinker.io/3fc64/6
JS
$(function() {
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
style: {
fontFamily: 'Lato',
color: "red"
}
},
plotOptions: {
pie: {
cursor: 'pointer'
}
},
credits: false,
title: false,
tooltip: false,
series: [{
type: 'pie',
data: [
{
name: 'Example1',
y: 40,
sliced: true,
color: "rgb(10,200,23)"
},
['Example2', 12.0],
['Example3', 26.8],
['Example4', 8.5],
['Example5', 6.2],
['Example6', 0.7]
]
}]
});
});
CSS
@import url(http://fonts.googleapis.com/css?family=Lato);
HTML
<div id="container" style="width:100%; height:400px;"></div>
我错过了什么?任何想法或建议要做到这一点?提前致谢。
真的感谢!完美的作品,你给我们一个很好的解释! – harrison4 2013-05-03 06:35:02