• Andrzej Mleczko administrator
  • #Raporty
  • Statystyki sprzedaży
  • jQuery(function ($) { $(".sidebar-dropdown > a").click(function () { $(".sidebar-submenu").slideUp(200); if ($(this).parent().hasClass("active")) { $(".sidebar-dropdown").removeClass("active"); $(this).parent().removeClass("active"); } else { $(".sidebar-dropdown").removeClass("active"); $(this).next(".sidebar-submenu").slideDown(200); $(this).parent().addClass("active"); } }); Gradientify -- do gradientów przejscia var canvas = document.getElementById("barChart"); var ctx = canvas.getContext('2d'); // Global Options: Chart.defaults.global.defaultFontColor = 'black'; Chart.defaults.global.defaultFontSize = 16; var data = { labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], datasets: [{ label: "Stock A", fill: false, lineTension: 0.1, backgroundColor: "rgba(225,0,0,0.4)", borderColor: "red", // The main line color borderCapStyle: 'square', borderDash: [], // try [5, 15] for instance borderDashOffset: 0.0, borderJoinStyle: 'miter', pointBorderColor: "black", pointBackgroundColor: "white", pointBorderWidth: 1, pointHoverRadius: 8, pointHoverBackgroundColor: "yellow", pointHoverBorderColor: "brown", pointHoverBorderWidth: 2, pointRadius: 4, pointHitRadius: 10, // notice the gap in the data and the spanGaps: true data: [65, 59, 80, 81, 56, 55, 40, ,60,55,30,78], spanGaps: true, }, { label: "Stock B", fill: true, lineTension: 0.1, backgroundColor: "rgba(167,105,0,0.4)", borderColor: "rgb(167, 105, 0)", borderCapStyle: 'butt', borderDash: [], borderDashOffset: 0.0, borderJoinStyle: 'miter', pointBorderColor: "white", pointBackgroundColor: "black", pointBorderWidth: 1, pointHoverRadius: 8, pointHoverBackgroundColor: "brown", pointHoverBorderColor: "yellow", pointHoverBorderWidth: 2, pointRadius: 4, pointHitRadius: 10, // notice the gap in the data and the spanGaps: false data: [10, 20, 60, 95, 64, 78, 90,,70,40,70,89], spanGaps: false, } ] }; // Notice the scaleLabel at the same level as Ticks var options = { scales: { yAxes: [{ ticks: { beginAtZero:true }, scaleLabel: { display: true, labelString: 'Moola', fontSize: 20 } }] } }; // Chart declaration: var myBarChart = new Chart(ctx, { type: 'line', data: data, options: options });