Fixed bug where an empty chart (one with no data) would crash.