curvechart: add a couple of checks of the data