I was wondering how people solve this trivial problem. Let's say you want to show a graph after getting the data from the network call. The graph should show a loading state while the data has not arrived, should show the graph if the data has arrived and if the arrived data is empty show a no data state.
John Clayton
Remember, none of us have ever done anything like this before. Except for Mike, who once stole a tank and invaded Paris.
If there's no data, I don't show the graph - a simple message to the user saying "No data is available for the selection you have made" or words to that effect. Usually in the div that would've contained the graph had a graph been available. If it's all done via ajax, then the message gets shown in a modal over the page and the graph is left in it's default, empty, state.