ons);
                        // Create the legend
                        var legend = myLineChart.generateLegend();
                        $("#legend").html(legend);



                    } else {    // Chart has already been built, so just update the data


                        // Too many X-axis lables can be cluttering, so skip every other label
                        var print_label = true;
                        if (myLineChart.datasets[0].points.length > 1) {
                            for (