0

I am using highcharts with angularjs (highcharts-ng) and getting series data dynamically that series data array may be null, if null I want to display message some thing like "No data available" in graph div. How can I do this??

NM Pennypacker
  • 6,704
  • 11
  • 36
  • 38
Asad Fida
  • 216
  • 2
  • 6
  • 1
    Have you tried to use `no-data-to-display.js` plugin? See [API](http://api.highcharts.com/highcharts#noData). – Paweł Fus Mar 05 '15 at 11:13

1 Answers1

0

Just use a div before your chart that appears only if no data is null like;

<div ng-if="myData === null || (myData && myData.length === 0)">
     <h3>No data available</h3>
</div>
masimplo
  • 3,674
  • 2
  • 30
  • 47