Can we show a message using highcharts.When the data is not available? we have to show a message Example : No Data Available
. If we have data hide : No Data Available
message . in highcharts dynamically
JavaScript
x
8
1
Highcharts.chart('container', {
2
chart: {
3
type: 'bubble',
4
plotBorderWidth: 0,
5
zoomType: 'xy'
6
},
7
});
8
Advertisement
Answer
You can use Highcharts Chart Renderer
Here’s an example in JSFiddle
JavaScript
1
23
23
1
var chart = new Highcharts.Chart({
2
3
chart: {
4
renderTo: 'container'
5
},
6
7
xAxis: {
8
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
9
},
10
11
series: []
12
13
}, function(chart) { // on complete
14
15
chart.renderer.text('No Data Available', 140, 120)
16
.css({
17
color: '#4572A7',
18
fontSize: '16px'
19
})
20
.add();
21
22
});
23