GPQAPP
1/* global Chart:false */
2
3$(function () {4'use strict'5
6var ticksStyle = {7fontColor: '#495057',8fontStyle: 'bold'9}10
11var mode = 'index'12var intersect = true13
14var $salesChart = $('#sales-chart')15// eslint-disable-next-line no-unused-vars16var salesChart = new Chart($salesChart, {17type: 'bar',18data: {19labels: ['JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'],20datasets: [21{22backgroundColor: '#007bff',23borderColor: '#007bff',24data: [1000, 2000, 3000, 2500, 2700, 2500, 3000]25},26{27backgroundColor: '#ced4da',28borderColor: '#ced4da',29data: [700, 1700, 2700, 2000, 1800, 1500, 2000]30}31]32},33options: {34maintainAspectRatio: false,35tooltips: {36mode: mode,37intersect: intersect38},39hover: {40mode: mode,41intersect: intersect42},43legend: {44display: false45},46scales: {47yAxes: [{48// display: false,49gridLines: {50display: true,51lineWidth: '4px',52color: 'rgba(0, 0, 0, .2)',53zeroLineColor: 'transparent'54},55ticks: $.extend({56beginAtZero: true,57
58// Include a dollar sign in the ticks59callback: function (value) {60if (value >= 1000) {61value /= 100062value += 'k'63}64
65return '$' + value66}67}, ticksStyle)68}],69xAxes: [{70display: true,71gridLines: {72display: false73},74ticks: ticksStyle75}]76}77}78})79
80var $visitorsChart = $('#visitors-chart')81// eslint-disable-next-line no-unused-vars82var visitorsChart = new Chart($visitorsChart, {83data: {84labels: ['18th', '20th', '22nd', '24th', '26th', '28th', '30th'],85datasets: [{86type: 'line',87data: [100, 120, 170, 167, 180, 177, 160],88backgroundColor: 'transparent',89borderColor: '#007bff',90pointBorderColor: '#007bff',91pointBackgroundColor: '#007bff',92fill: false93// pointHoverBackgroundColor: '#007bff',94// pointHoverBorderColor : '#007bff'95},96{97type: 'line',98data: [60, 80, 70, 67, 80, 77, 100],99backgroundColor: 'tansparent',100borderColor: '#ced4da',101pointBorderColor: '#ced4da',102pointBackgroundColor: '#ced4da',103fill: false104// pointHoverBackgroundColor: '#ced4da',105// pointHoverBorderColor : '#ced4da'106}]107},108options: {109maintainAspectRatio: false,110tooltips: {111mode: mode,112intersect: intersect113},114hover: {115mode: mode,116intersect: intersect117},118legend: {119display: false120},121scales: {122yAxes: [{123// display: false,124gridLines: {125display: true,126lineWidth: '4px',127color: 'rgba(0, 0, 0, .2)',128zeroLineColor: 'transparent'129},130ticks: $.extend({131beginAtZero: true,132suggestedMax: 200133}, ticksStyle)134}],135xAxes: [{136display: true,137gridLines: {138display: false139},140ticks: ticksStyle141}]142}143}144})145})146
147// lgtm [js/unused-local-variable]
148