I have a task to create multiple charts, where the first page needs to include a header and the first 8 charts. How can I insert a page break after the 8th chart and move on to a second page without a header? Each student has different subjects and scores, resulting in multiple charts for each report.
var count = 1;
$.get('/rest/report/' + id, function (data) {
data.subjects.forEach(function (subject, index) {
console.log(index);
var container = $('<div class="one-chart"></div>')[0];
if (count < 8) {
$('.charts-container').last().append(container);
renderOneChart(container, subject.name, subject.scores);
count++;
}
});
});
$('body').append('<div class="page" ></div>');
});