1. highCharts 无数据时显示:
红色部分为主要设置:
<span style="white-space:pre">$(divId)</span>.highcharts({
title : {
text : ''
},
chart : {
height : height,
width : width,
type : "column"
},
<span style="color:#ff0000;"> lang: {
noData: "暂无数据!"
},
noData: {
style: {
fontWeight: 'bold',
fontSize: '18px',
color: '#303030'
}
}</span>,
subtitle : {
text : ''
},
xAxis : {
categories : x
},
yAxis : {
title : {
text : ''
}
},
legend : {
enabled : false
},
series : [ {
name : '分配数(PN)',
data : d
} ]
});
要达成效果,还需引入几个js:
<script src="js/tools-Js/d3.v3.min.js" type="text/javascript"></script>
<script src="../../newplatform/plugin/Highcharts-4.1.5/no-data-to-display.js" type="text/javascript"></script>