123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 |
- "use strict";
- /* eslint-disable object-shorthand */
- /* global Chart, CustomTooltips, getStyle, hexToRgba */
- /**
- * --------------------------------------------------------------------------
- * CoreUI Free Boostrap Admin Template (v2.1.15): main.js
- * Licensed under MIT (https://coreui.io/license)
- * --------------------------------------------------------------------------
- */
- /* eslint-disable no-magic-numbers */
- // Disable the on-canvas tooltip
- Chart.defaults.global.pointHitDetectionRadius = 1;
- Chart.defaults.global.tooltips.enabled = false;
- Chart.defaults.global.tooltips.mode = 'index';
- Chart.defaults.global.tooltips.position = 'nearest';
- Chart.defaults.global.tooltips.custom = CustomTooltips;
- Chart.defaults.global.tooltips.intersect = true;
- Chart.defaults.global.tooltips.callbacks.labelColor = function (tooltipItem, chart) {
- return {
- backgroundColor: chart.data.datasets[tooltipItem.datasetIndex].borderColor
- };
- }; // eslint-disable-next-line no-unused-vars
- var cardChart1 = new Chart($('#card-chart1'), {
- type: 'line',
- data: {
- labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
- datasets: [{
- label: 'My First dataset',
- backgroundColor: getStyle('--primary'),
- borderColor: 'rgba(255,255,255,.55)',
- data: [65, 59, 84, 84, 51, 55, 40]
- }]
- },
- options: {
- maintainAspectRatio: false,
- legend: {
- display: false
- },
- scales: {
- xAxes: [{
- gridLines: {
- color: 'transparent',
- zeroLineColor: 'transparent'
- },
- ticks: {
- fontSize: 2,
- fontColor: 'transparent'
- }
- }],
- yAxes: [{
- display: false,
- ticks: {
- display: false,
- min: 35,
- max: 89
- }
- }]
- },
- elements: {
- line: {
- borderWidth: 1
- },
- point: {
- radius: 4,
- hitRadius: 10,
- hoverRadius: 4
- }
- }
- }
- }); // eslint-disable-next-line no-unused-vars
- var cardChart2 = new Chart($('#card-chart2'), {
- type: 'line',
- data: {
- labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
- datasets: [{
- label: 'My First dataset',
- backgroundColor: getStyle('--info'),
- borderColor: 'rgba(255,255,255,.55)',
- data: [1, 18, 9, 17, 34, 22, 11]
- }]
- },
- options: {
- maintainAspectRatio: false,
- legend: {
- display: false
- },
- scales: {
- xAxes: [{
- gridLines: {
- color: 'transparent',
- zeroLineColor: 'transparent'
- },
- ticks: {
- fontSize: 2,
- fontColor: 'transparent'
- }
- }],
- yAxes: [{
- display: false,
- ticks: {
- display: false,
- min: -4,
- max: 39
- }
- }]
- },
- elements: {
- line: {
- tension: 0.00001,
- borderWidth: 1
- },
- point: {
- radius: 4,
- hitRadius: 10,
- hoverRadius: 4
- }
- }
- }
- }); // eslint-disable-next-line no-unused-vars
- var cardChart3 = new Chart($('#card-chart3'), {
- type: 'line',
- data: {
- labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
- datasets: [{
- label: 'My First dataset',
- backgroundColor: 'rgba(255,255,255,.2)',
- borderColor: 'rgba(255,255,255,.55)',
- data: [78, 81, 80, 45, 34, 12, 40]
- }]
- },
- options: {
- maintainAspectRatio: false,
- legend: {
- display: false
- },
- scales: {
- xAxes: [{
- display: false
- }],
- yAxes: [{
- display: false
- }]
- },
- elements: {
- line: {
- borderWidth: 2
- },
- point: {
- radius: 0,
- hitRadius: 10,
- hoverRadius: 4
- }
- }
- }
- }); // eslint-disable-next-line no-unused-vars
- var cardChart4 = new Chart($('#card-chart4'), {
- type: 'bar',
- data: {
- labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April'],
- datasets: [{
- label: 'My First dataset',
- backgroundColor: 'rgba(255,255,255,.2)',
- borderColor: 'rgba(255,255,255,.55)',
- data: [78, 81, 80, 45, 34, 12, 40, 85, 65, 23, 12, 98, 34, 84, 67, 82]
- }]
- },
- options: {
- maintainAspectRatio: false,
- legend: {
- display: false
- },
- scales: {
- xAxes: [{
- display: false,
- barPercentage: 0.6
- }],
- yAxes: [{
- display: false
- }]
- }
- }
- }); // eslint-disable-next-line no-unused-vars
- var mainChart = new Chart($('#main-chart'), {
- type: 'line',
- data: {
- labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S'],
- datasets: [{
- label: 'My First dataset',
- backgroundColor: hexToRgba(getStyle('--info'), 10),
- borderColor: getStyle('--info'),
- pointHoverBackgroundColor: '#fff',
- borderWidth: 2,
- data: [165, 180, 70, 69, 77, 57, 125, 165, 172, 91, 173, 138, 155, 89, 50, 161, 65, 163, 160, 103, 114, 185, 125, 196, 183, 64, 137, 95, 112, 175]
- }, {
- label: 'My Second dataset',
- backgroundColor: 'transparent',
- borderColor: getStyle('--success'),
- pointHoverBackgroundColor: '#fff',
- borderWidth: 2,
- data: [92, 97, 80, 100, 86, 97, 83, 98, 87, 98, 93, 83, 87, 98, 96, 84, 91, 97, 88, 86, 94, 86, 95, 91, 98, 91, 92, 80, 83, 82]
- }, {
- label: 'My Third dataset',
- backgroundColor: 'transparent',
- borderColor: getStyle('--danger'),
- pointHoverBackgroundColor: '#fff',
- borderWidth: 1,
- borderDash: [8, 5],
- data: [65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65]
- }]
- },
- options: {
- maintainAspectRatio: false,
- legend: {
- display: false
- },
- scales: {
- xAxes: [{
- gridLines: {
- drawOnChartArea: false
- }
- }],
- yAxes: [{
- ticks: {
- beginAtZero: true,
- maxTicksLimit: 5,
- stepSize: Math.ceil(250 / 5),
- max: 250
- }
- }]
- },
- elements: {
- point: {
- radius: 0,
- hitRadius: 10,
- hoverRadius: 4,
- hoverBorderWidth: 3
- }
- }
- }
- });
- var brandBoxChartLabels = ['January', 'February', 'March', 'April', 'May', 'June', 'July'];
- var brandBoxChartOptions = {
- responsive: true,
- maintainAspectRatio: false,
- legend: {
- display: false
- },
- scales: {
- xAxes: [{
- display: false
- }],
- yAxes: [{
- display: false
- }]
- },
- elements: {
- point: {
- radius: 0,
- hitRadius: 10,
- hoverRadius: 4,
- hoverBorderWidth: 3
- }
- } // eslint-disable-next-line no-unused-vars
- };
- var brandBoxChart1 = new Chart($('#social-box-chart-1'), {
- type: 'line',
- data: {
- labels: brandBoxChartLabels,
- datasets: [{
- label: 'My First dataset',
- backgroundColor: 'rgba(255,255,255,.1)',
- borderColor: 'rgba(255,255,255,.55)',
- pointHoverBackgroundColor: '#fff',
- borderWidth: 2,
- data: [65, 59, 84, 84, 51, 55, 40]
- }]
- },
- options: brandBoxChartOptions
- }); // eslint-disable-next-line no-unused-vars
- var brandBoxChart2 = new Chart($('#social-box-chart-2'), {
- type: 'line',
- data: {
- labels: brandBoxChartLabels,
- datasets: [{
- label: 'My First dataset',
- backgroundColor: 'rgba(255,255,255,.1)',
- borderColor: 'rgba(255,255,255,.55)',
- pointHoverBackgroundColor: '#fff',
- borderWidth: 2,
- data: [1, 13, 9, 17, 34, 41, 38]
- }]
- },
- options: brandBoxChartOptions
- }); // eslint-disable-next-line no-unused-vars
- var brandBoxChart3 = new Chart($('#social-box-chart-3'), {
- type: 'line',
- data: {
- labels: brandBoxChartLabels,
- datasets: [{
- label: 'My First dataset',
- backgroundColor: 'rgba(255,255,255,.1)',
- borderColor: 'rgba(255,255,255,.55)',
- pointHoverBackgroundColor: '#fff',
- borderWidth: 2,
- data: [78, 81, 80, 45, 34, 12, 40]
- }]
- },
- options: brandBoxChartOptions
- }); // eslint-disable-next-line no-unused-vars
- var brandBoxChart4 = new Chart($('#social-box-chart-4'), {
- type: 'line',
- data: {
- labels: brandBoxChartLabels,
- datasets: [{
- label: 'My First dataset',
- backgroundColor: 'rgba(255,255,255,.1)',
- borderColor: 'rgba(255,255,255,.55)',
- pointHoverBackgroundColor: '#fff',
- borderWidth: 2,
- data: [35, 23, 56, 22, 97, 23, 64]
- }]
- },
- options: brandBoxChartOptions
- });
- //# sourceMappingURL=main.js.map
|