There is a cool features: when data is missing specified message is
being displayed instead of empty chart or when any error occurs some
message is also displayed instead of empty chart. Unfortunately both
of them don't work at this moment. So it's time to fix. Following
changes have been made in order to fix this issue:
override afterDraw instead of beforeRender when we want to draw
text over canvas. I don't know why beforeRender doesn't work as
expected and too lazy to find it out.
fix beforeUpdate flow. Previously we used to continue chart rendering
without waiting for HTTP response, i.e. afterDraw/beforeRender were
called with datasets from previous response. Since now we return
false from beforeUpdate after sending HTTP request which cause chartjs
to stop further rendering. Rendering is resumed from response callbacks.
There is a cool features: when data is missing specified message is being displayed instead of empty chart or when any error occurs some message is also displayed instead of empty chart. Unfortunately both of them don't work at this moment. So it's time to fix. Following changes have been made in order to fix this issue: