1
0
forked from Tank/braga
braga/public/js/bulma.js
2026-03-08 15:29:51 +04:00

96 lines
1.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$( document ).ready(function() {
$('input[name="datetimes"]').daterangepicker({
timePicker: true,
startDate: $('#dater').data('start'),
endDate: $('#dater').data('end'),
timePicker24Hour: true,
locale: {
format: 'YYYY-MM-DD HH:mm:ss',
separator: ' > ',
applyLabel: 'Применить',
cancelLabel: 'Отменить',
fromLabel: 'С',
toLabel: 'По',
weekLabel: 'Н',
daysOfWeek: [
'Вск',
'Пнд',
'Втр',
'Срд',
'Чтв',
'Птн',
'Сбт'
],
monthNames: [
'Январь',
'Февраль',
'Март',
'Апрель',
'Май',
'Июнь',
'Июль',
'Август',
'Сентябрь',
'Октябрь',
'Ноябрь',
'Декабрь'
],
firstDay: 1
}
});
Chart.defaults.color = '#FFF';
Chart.defaults.borderColor = '#555';
new Chart($('#daystats'), {
type: 'bar',
data: {
labels: $('#daystats').data('labels'),
datasets: [{
label: 'Температура сусла',
data: $('#daystats').data('vals'),
borderWidth: 1,
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(54, 162, 235)',
'rgb(255, 205, 86)'
],
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
new Chart($('#daystats1'), {
type: 'bar',
data: {
labels: $('#daystats1').data('labels'),
datasets: [{
label: 'Температура сусла',
data: $('#daystats1').data('vals'),
borderWidth: 1,
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(54, 162, 235)',
'rgb(255, 205, 86)'
],
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
});