Temporarily removed timeline graph
This commit is contained in:
parent
5e92999bd2
commit
2f0f177738
1 changed files with 39 additions and 39 deletions
|
|
@ -815,51 +815,51 @@ function rl_mailwarmer_display_campaign_timeline($post) {
|
|||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
<canvas id="timelineChart" style="max-height: 300px;"></canvas>
|
||||
<!-- <canvas id="timelineChart" style="max-height: 300px;"></canvas> -->
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
const ctx = document.getElementById('timelineChart');
|
||||
const data = <?php echo json_encode($chart_data); ?>;
|
||||
|
||||
new Chart(ctx, {
|
||||
data: {
|
||||
labels: data.map(row => row.date),
|
||||
datasets: [{
|
||||
type: 'bar',
|
||||
label: 'Target Volume',
|
||||
data: data.map(row => row.target),
|
||||
backgroundColor: 'rgb(255, 0, 0)',
|
||||
borderColor: 'rgb(255, 0, 0)',
|
||||
borderWidth: 1,
|
||||
order: 10,
|
||||
fill: false
|
||||
}, {
|
||||
type: 'bar',
|
||||
label: 'Emails Sent',
|
||||
data: data.map(row => row.sent),
|
||||
backgroundColor: 'rgba(0, 255, 0)',
|
||||
borderColor: 'rgba(0, 255, 0, 0.8)',
|
||||
borderWidth: 1,
|
||||
order: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Number of Emails'
|
||||
}
|
||||
},
|
||||
x: {
|
||||
stacked: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// new Chart(ctx, {
|
||||
// data: {
|
||||
// labels: data.map(row => row.date),
|
||||
// datasets: [{
|
||||
// type: 'bar',
|
||||
// label: 'Target Volume',
|
||||
// data: data.map(row => row.target),
|
||||
// backgroundColor: 'rgb(255, 0, 0)',
|
||||
// borderColor: 'rgb(255, 0, 0)',
|
||||
// borderWidth: 1,
|
||||
// order: 10,
|
||||
// fill: false
|
||||
// }, {
|
||||
// type: 'bar',
|
||||
// label: 'Emails Sent',
|
||||
// data: data.map(row => row.sent),
|
||||
// backgroundColor: 'rgba(0, 255, 0)',
|
||||
// borderColor: 'rgba(0, 255, 0, 0.8)',
|
||||
// borderWidth: 1,
|
||||
// order: 1
|
||||
// }]
|
||||
// },
|
||||
// options: {
|
||||
// responsive: true,
|
||||
// scales: {
|
||||
// y: {
|
||||
// beginAtZero: true,
|
||||
// title: {
|
||||
// display: true,
|
||||
// text: 'Number of Emails'
|
||||
// }
|
||||
// },
|
||||
// x: {
|
||||
// stacked: true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue