public static ArrayNode generateDataPointArrayNode(ChartModel cm) {
        ArrayNode array = MAPPER.createArrayNode();
        for (ChartModel.DataPoint dp : cm.getDataPoints()) {
            array.add(toJsonNode(dp, cm));
        }
        return array;
    }
@Test
    public void basic() {
        ChartModel cm = new ChartModel(FOO, BAR);
        cm.addDataPoint(1L).data(FOO, 1D).data(BAR, 2D);
        cm.addDataPoint(2L).data(FOO, 3D).data(BAR, 4D);

        ArrayNode array = ChartUtils.generateDataPointArrayNode(cm);
        Assert.assertEquals("wrong results", ARRAY_AS_STRING, array.toString());
    }