Issue 323

Basically the same code as in scatterChart.js