A while ago I was working on an app, where I often got empty plots. It was completely valid for the plot to be empty, though often an empty plot was the result of an error in the code. Unfortunately, there was no easy way to indicate which condition was causing the empty plot without watching the console.
There were a couple of methods I could use:
- Show the log file in the UI
- Add a status indicator to the UI
There are a number of problems showing the log file: it takes up a lot of screen real estate, it is not obvious any particular log entry is the cause, and the log entry may require knowledge of the application internals to decipher.
So once I decided that I wanted a status indicator in the IU, the follow up question is, where? I started looking at some of the apps I use most frequently: how does Firefox indicate an error? It shows a little icon in the bottom right corner. I had never noticed it until I started looking for it, which makes it a bad example to me. In comparison, Google Chrome gives you a nice image and error message right where your eyes are focused (in the document pane). Right away the user knows there is an error.
I started thinking about how to display status indicators on Chaco plots. All of the framework was already in place, all that was needed was an Overlay class which could display an image. I decided to use SVG images rather than PNG’s so they can be scaled depending on the size of the plot, though I might be convinced to allow other image formats as well as text.
This screenshot is from the status_overlay.py example. The code (and images) should be considered a work in progress, though it is stable enough to begin using. For those that try it out, there is a nice fade effect too.