I'm using chart.Js to display my chart. I'm getting my chart data via ajax and graphically render it to display the data,
My question is, there are few cases when my Ajax returns nothing, and my Chart just display X axis and Y axis, with no data or no legend shown. Is there any option to show default text ?
PS: I know I can add some conditional statement and display "No chart Div" and hide my "chart div", but i was some clean method to do the same.
You can try this solution:
This works for me I hope it helps