Skip to content

Instantly share code, notes, and snippets.

@s4553711
Created December 5, 2013 09:10
Show Gist options
  • Save s4553711/7802355 to your computer and use it in GitHub Desktop.
Save s4553711/7802355 to your computer and use it in GitHub Desktop.
Add center text on the charts if there is no data in highcharts
var ele = $('#canvas').highcharts();
var textWidth = ele.chartWidth;
$('#canvas').highcharts().renderer.text("No Data Available.",(textWidth/2)-65,115).css({
color: '#4572A7',
fontSize: '16px',
textAlign: 'center',
}).attr({zIndex: 9999999}).add();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment