2021-03-09 17:20:27 +00:00
|
|
|
$.ajax({
|
2021-11-14 16:49:35 +00:00
|
|
|
url: base_url + 'index.php/dayswithqso/get_days',
|
|
|
|
success: function (data) {
|
|
|
|
if ($.trim(data)) {
|
|
|
|
var labels = [];
|
|
|
|
var dataDxcc = [];
|
|
|
|
$.each(data, function () {
|
|
|
|
labels.push(this.Year);
|
|
|
|
dataDxcc.push(this.Days);
|
|
|
|
});
|
|
|
|
var ctx = document.getElementById("myChartDiff").getContext('2d');
|
|
|
|
var color = ifDarkModeThemeReturn('white', 'grey');
|
|
|
|
var myChart = new Chart(ctx, {
|
|
|
|
type: 'bar',
|
|
|
|
data: {
|
|
|
|
labels: labels,
|
|
|
|
datasets: [{
|
2024-01-01 13:45:37 +00:00
|
|
|
label: lang_days_with_qso_short,
|
2021-11-14 16:49:35 +00:00
|
|
|
data: dataDxcc,
|
|
|
|
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
|
|
|
borderColor: 'rgba(54, 162, 235, 1)',
|
2022-09-18 14:53:45 +00:00
|
|
|
borderWidth: 2,
|
|
|
|
color: color
|
2021-03-09 17:20:27 +00:00
|
|
|
}]
|
|
|
|
},
|
2021-11-14 16:49:35 +00:00
|
|
|
options: {
|
|
|
|
scales: {
|
2022-09-18 14:53:45 +00:00
|
|
|
y: {
|
2021-11-14 16:49:35 +00:00
|
|
|
ticks: {
|
|
|
|
beginAtZero: true,
|
2022-09-18 14:53:45 +00:00
|
|
|
color: color
|
2021-11-14 16:49:35 +00:00
|
|
|
}
|
2022-09-18 14:53:45 +00:00
|
|
|
},
|
|
|
|
x: {
|
2021-11-14 16:49:35 +00:00
|
|
|
ticks: {
|
2022-09-18 14:53:45 +00:00
|
|
|
color: color
|
2021-11-14 16:49:35 +00:00
|
|
|
}
|
2022-09-18 14:53:45 +00:00
|
|
|
}
|
2021-11-14 16:49:35 +00:00
|
|
|
},
|
2022-09-18 14:53:45 +00:00
|
|
|
plugins: {
|
|
|
|
legend: {
|
|
|
|
labels: {
|
|
|
|
color: color
|
|
|
|
}
|
2021-11-14 16:49:35 +00:00
|
|
|
}
|
2021-09-10 16:53:24 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-14 16:49:35 +00:00
|
|
|
});
|
|
|
|
}
|
2021-03-09 17:20:27 +00:00
|
|
|
}
|
|
|
|
});
|