var chart = new Chart(ctx, {
type: type,
data: {
labels: date,
datasets: [{
label: 'Ham / Accepted',
data: ham,
backgroundColor: '#1FE700',
borderWidth: 1
},
{
label: 'Spam / Dropped',
data: spam,
backgroundColor: '#E52000',
borderWidth: 1
},
{
data: threshold,
type: 'scatter',
borderColor: 'transparent',
backgroundColor: 'transparent',
pointBackgroundColor: '#000000'
}]
},
options: {
legend: {
display: false
}
}
});
chart.destroy();
chart = new Chart(ctx, {
type: type,
data: {
labels: date,
datasets: [{
label: 'Ham / Accepted',
data: ham,
backgroundColor: '#1FE700',
borderWidth: 1
},
{
label: 'Spam / Dropped',
data: spam,
backgroundColor: '#E52000',
borderWidth: 1
},
{
data: threshold,
type: 'scatter',
borderColor: 'transparent',
backgroundColor: 'transparent',
pointBackgroundColor: '#000000'
}]
},
options: {
legend: {
display: false
}
}
});