jquery highcharts中的背景颜色更改
想知道如何更改jquery highcharts的背景色。我在highcharts网站上尝试了该代码,但无法使其正常工作。这是我的密码。任何帮助都将不胜感激。多谢各位jquery highcharts中的背景颜色更改,jquery,highcharts,Jquery,Highcharts,想知道如何更改jquery highcharts的背景色。我在highcharts网站上尝试了该代码,但无法使其正常工作。这是我的密码。任何帮助都将不胜感激。多谢各位 <script type="text/javascript"> var chart; $(document).ready(function() { chart = new Highcharts.Chart({ chart: { renderTo: 'stats
<script type="text/javascript">
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'stats_vmonth',
type: 'spline'
},
title: {
text: 'Visitor Stats'
},
subtitle: {
text: 'This Month (<?php echo $thismonth;?>)'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%e. %b',
year: '%b'
}
},
yAxis: {
title: {
text: 'Visitors'
},
min: 0
},
tooltip: {
formatter: function() {
return '<b>'+ Highcharts.dateFormat('%e, %b', this.x) +'</b><br/>'+
this.y +' Visitors';
}
},
series: [{
name: 'This Year Visitor Stats',
// Define the data points. All series have a dummy year
// of 1970/71 in order to be compared on the same x axis. Note
// that in JavaScript, months start at 0 for January, 1 for February etc.
data: [
<?php while($morow = mysql_fetch_array($moresult)){?>
[Date.UTC(<?php echo $year;?>, <?php echo $month-1;?>, <?php echo $morow['day'];?>), <?php echo $morow['COUNT(url)'];?> ],
<?php }?>
]
}]
});
});
</script>
试试主题选项
Highcharts.theme = {
chart: {
backgroundColor: {
linearGradient: [0, 0, 500, 500],
stops: [
[0, 'rgb(255, 255, 255)'],
[1, 'rgb(240, 240, 255)']
]
}
}
试试主题选项
Highcharts.theme = {
chart: {
backgroundColor: {
linearGradient: [0, 0, 500, 500],
stops: [
[0, 'rgb(255, 255, 255)'],
[1, 'rgb(240, 240, 255)']
]
}
}
感谢这项工作,我也尝试直接更改highcharts js文件,效果也不错。感谢这项工作,我也尝试直接更改highcharts js文件,效果也不错。