curvechart: add some checks of data input
scatterplot: add some checks of data input