Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let data_linear = {
- labels: ["01.05", "02.05", "03.05", "04.05", "05.05", "06.05", "07.05", "08.05", "09.05", "10.05", "11.05", "12.05", "01.05", "02.05", "03.05", "04.05", "05.05", "06.05", "07.05", "08.05", "09.05", "10.05", "11.05", "12.05", "07.05", "08.05", "09.05", "10.05", "11.05", "12.05"],
- datasets: [{
- label: 'Количество нажатий',
- data: [423, 595, 755, 415, 553, 552, 602, 653, 552, 701, 721, 793, 423, 595, 755, 415, 553, 552, 602, 653, 552, 701, 721, 793, 552, 602, 653, 552, 701, 721, 793],
- // showLine: false,
- // spanGaps: true,
- backgroundColor: function(context) {
- const chart = context.chart;
- const {
- ctx,
- chartArea
- } = chart;
- if (!chartArea) {
- // This case happens on initial chart load
- return null;
- }
- return getGradient(ctx, chartArea);
- },
- tension: .4,
- fill: true,
- pointRadius: 0,
- pointHitRadius: 20,
- }]
- };
- let lineChart = new Chart(document.querySelector('#linearChart'), {
- type: 'line',
- data: data_linear,
- options: {
- plugins: {
- legend: {
- display: false,
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement