Fix #169: Javasript Runtime Error when cursor is in a diagram region without data points

This fixes #169 for me