123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122 |
-
- 'use strict';
-
- (function () {
-
- const purpleColor = '#836AF9',
- yellowColor = '#ffe800',
- cyanColor = '#28dac6',
- orangeColor = '#FF8132',
- orangeLightColor = '#FDAC34',
- oceanBlueColor = '#299AFF',
- greyColor = '#4F5D70',
- greyLightColor = '#EDF1F4',
- blueColor = '#2B9AFF',
- blueLightColor = '#84D0FF';
-
- let cardColor, headingColor, labelColor, borderColor, legendColor;
-
- if (isDarkStyle) {
- cardColor = config.colors_dark.cardColor;
- headingColor = config.colors_dark.headingColor;
- labelColor = config.colors_dark.textMuted;
- legendColor = config.colors_dark.bodyColor;
- borderColor = config.colors_dark.borderColor;
- } else {
- cardColor = config.colors.cardColor;
- headingColor = config.colors.headingColor;
- labelColor = config.colors.textMuted;
- legendColor = config.colors.bodyColor;
- borderColor = config.colors.borderColor;
- }
-
-
-
- const chartList = document.querySelectorAll('.chartjs');
- chartList.forEach(function (chartListItem) {
- chartListItem.height = chartListItem.dataset.height;
- });
-
-
-
- const barChart = document.getElementById('barChart');
- if (barChart) {
- const barChartVar = new Chart(barChart, {
- type: 'bar',
- data: {
- labels: [
- '7/12',
- '8/12',
- '9/12',
- '10/12',
- '11/12',
- '12/12',
- '13/12',
- '14/12',
- '15/12',
- '16/12',
- '17/12',
- '18/12',
- '19/12'
- ],
- datasets: [
- {
- data: [275, 90, 190, 205, 125, 85, 55, 87, 127, 150, 230, 280, 190],
- backgroundColor: cyanColor,
- borderColor: 'transparent',
- maxBarThickness: 15,
- borderRadius: {
- topRight: 15,
- topLeft: 15
- }
- }
- ]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- animation: {
- duration: 500
- },
- plugins: {
- tooltip: {
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- },
- legend: {
- display: false
- }
- },
- scales: {
- x: {
- grid: {
- color: borderColor,
- drawBorder: false,
- borderColor: borderColor
- },
- ticks: {
- color: labelColor
- }
- },
- y: {
- min: 0,
- max: 400,
- grid: {
- color: borderColor,
- drawBorder: false,
- borderColor: borderColor
- },
- ticks: {
- stepSize: 100,
- color: labelColor
- }
- }
- }
- }
- });
- }
-
-
-
-
- const horizontalBarChart = document.getElementById('horizontalBarChart');
- if (horizontalBarChart) {
- const horizontalBarChartVar = new Chart(horizontalBarChart, {
- type: 'bar',
- data: {
- labels: ['MON', 'TUE', 'WED ', 'THU', 'FRI', 'SAT', 'SUN'],
- datasets: [
- {
- data: [710, 350, 470, 580, 230, 460, 120],
- backgroundColor: config.colors.info,
- borderColor: 'transparent',
- maxBarThickness: 15
- }
- ]
- },
- options: {
- indexAxis: 'y',
- responsive: true,
- maintainAspectRatio: false,
- animation: {
- duration: 500
- },
- elements: {
- bar: {
- borderRadius: {
- topRight: 15,
- bottomRight: 15
- }
- }
- },
- plugins: {
- tooltip: {
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- },
- legend: {
- display: false
- }
- },
- scales: {
- x: {
- min: 0,
- grid: {
- color: borderColor,
- borderColor: borderColor
- },
- ticks: {
- color: labelColor
- }
- },
- y: {
- grid: {
- borderColor: borderColor,
- display: false,
- drawBorder: false
- },
- ticks: {
- color: labelColor
- }
- }
- }
- }
- });
- }
-
-
-
-
- const lineChart = document.getElementById('lineChart');
- if (lineChart) {
- const lineChartVar = new Chart(lineChart, {
- type: 'line',
- data: {
- labels: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140],
- datasets: [
- {
- data: [80, 150, 180, 270, 210, 160, 160, 202, 265, 210, 270, 255, 290, 360, 375],
- label: 'Europe',
- borderColor: config.colors.danger,
- tension: 0.5,
- pointStyle: 'circle',
- backgroundColor: config.colors.danger,
- fill: false,
- pointRadius: 1,
- pointHoverRadius: 5,
- pointHoverBorderWidth: 5,
- pointBorderColor: 'transparent',
- pointHoverBorderColor: cardColor,
- pointHoverBackgroundColor: config.colors.danger
- },
- {
- data: [80, 125, 105, 130, 215, 195, 140, 160, 230, 300, 220, 170, 210, 200, 280],
- label: 'Asia',
- borderColor: config.colors.primary,
- tension: 0.5,
- pointStyle: 'circle',
- backgroundColor: config.colors.primary,
- fill: false,
- pointRadius: 1,
- pointHoverRadius: 5,
- pointHoverBorderWidth: 5,
- pointBorderColor: 'transparent',
- pointHoverBorderColor: cardColor,
- pointHoverBackgroundColor: config.colors.primary
- },
- {
- data: [80, 99, 82, 90, 115, 115, 74, 75, 130, 155, 125, 90, 140, 130, 180],
- label: 'Africa',
- borderColor: yellowColor,
- tension: 0.5,
- pointStyle: 'circle',
- backgroundColor: yellowColor,
- fill: false,
- pointRadius: 1,
- pointHoverRadius: 5,
- pointHoverBorderWidth: 5,
- pointBorderColor: 'transparent',
- pointHoverBorderColor: cardColor,
- pointHoverBackgroundColor: yellowColor
- }
- ]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- scales: {
- x: {
- grid: {
- color: borderColor,
- drawBorder: false,
- borderColor: borderColor
- },
- ticks: {
- color: labelColor
- }
- },
- y: {
- scaleLabel: {
- display: true
- },
- min: 0,
- max: 400,
- ticks: {
- color: labelColor,
- stepSize: 100
- },
- grid: {
- color: borderColor,
- drawBorder: false,
- borderColor: borderColor
- }
- }
- },
- plugins: {
- tooltip: {
-
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- },
- legend: {
- position: 'top',
- align: 'start',
- rtl: isRtl,
- labels: {
- usePointStyle: true,
- padding: 35,
- boxWidth: 6,
- boxHeight: 6,
- color: legendColor
- }
- }
- }
- }
- });
- }
-
-
-
-
- const radarChart = document.getElementById('radarChart');
- if (radarChart) {
-
- const gradientBlue = radarChart.getContext('2d').createLinearGradient(0, 0, 0, 150);
- gradientBlue.addColorStop(0, 'rgba(85, 85, 255, 0.9)');
- gradientBlue.addColorStop(1, 'rgba(151, 135, 255, 0.8)');
-
- const gradientRed = radarChart.getContext('2d').createLinearGradient(0, 0, 0, 150);
- gradientRed.addColorStop(0, 'rgba(255, 85, 184, 0.9)');
- gradientRed.addColorStop(1, 'rgba(255, 135, 135, 0.8)');
-
- const radarChartVar = new Chart(radarChart, {
- type: 'radar',
- data: {
- labels: ['STA', 'STR', 'AGI', 'VIT', 'CHA', 'INT'],
- datasets: [
- {
- label: 'Donté Panlin',
- data: [25, 59, 90, 81, 60, 82],
- fill: true,
- pointStyle: 'dash',
- backgroundColor: gradientRed,
- borderColor: 'transparent',
- pointBorderColor: 'transparent'
- },
- {
- label: 'Mireska Sunbreeze',
- data: [40, 100, 40, 90, 40, 90],
- fill: true,
- pointStyle: 'dash',
- backgroundColor: gradientBlue,
- borderColor: 'transparent',
- pointBorderColor: 'transparent'
- }
- ]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- animation: {
- duration: 500
- },
- scales: {
- r: {
- ticks: {
- maxTicksLimit: 1,
- display: false,
- color: labelColor
- },
- grid: {
- color: borderColor
- },
- angleLines: { color: borderColor },
- pointLabels: {
- color: labelColor
- }
- }
- },
- plugins: {
- legend: {
- rtl: isRtl,
- position: 'top',
- labels: {
- padding: 25,
- color: legendColor
- }
- },
- tooltip: {
-
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- }
- }
- }
- });
- }
-
-
-
-
- const polarChart = document.getElementById('polarChart');
- if (polarChart) {
- const polarChartVar = new Chart(polarChart, {
- type: 'polarArea',
- data: {
- labels: ['Africa', 'Asia', 'Europe', 'America', 'Antarctica', 'Australia'],
- datasets: [
- {
- label: 'Population (millions)',
- backgroundColor: [purpleColor, yellowColor, orangeColor, oceanBlueColor, greyColor, cyanColor],
- data: [19, 17.5, 15, 13.5, 11, 9],
- borderWidth: 0
- }
- ]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- animation: {
- duration: 500
- },
- scales: {
- r: {
- ticks: {
- display: false,
- color: labelColor
- },
- grid: {
- display: false
- }
- }
- },
- plugins: {
- tooltip: {
-
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- },
- legend: {
- rtl: isRtl,
- position: 'right',
- labels: {
- usePointStyle: true,
- padding: 25,
- boxWidth: 8,
- boxHeight: 8,
- color: legendColor
- }
- }
- }
- }
- });
- }
-
-
-
-
- const bubbleChart = document.getElementById('bubbleChart');
- if (bubbleChart) {
- const bubbleChartVar = new Chart(bubbleChart, {
- type: 'bubble',
- data: {
- animation: {
- duration: 10000
- },
- datasets: [
- {
- label: 'Dataset 1',
- backgroundColor: purpleColor,
- borderColor: purpleColor,
- data: [
- {
- x: 20,
- y: 74,
- r: 10
- },
- {
- x: 10,
- y: 110,
- r: 5
- },
- {
- x: 30,
- y: 165,
- r: 7
- },
- {
- x: 40,
- y: 200,
- r: 20
- },
- {
- x: 90,
- y: 185,
- r: 7
- },
- {
- x: 50,
- y: 240,
- r: 7
- },
- {
- x: 60,
- y: 275,
- r: 10
- },
- {
- x: 70,
- y: 305,
- r: 5
- },
- {
- x: 80,
- y: 325,
- r: 4
- },
- {
- x: 100,
- y: 310,
- r: 5
- },
- {
- x: 110,
- y: 240,
- r: 5
- },
- {
- x: 120,
- y: 270,
- r: 7
- },
- {
- x: 130,
- y: 300,
- r: 6
- }
- ]
- },
- {
- label: 'Dataset 2',
- backgroundColor: yellowColor,
- borderColor: yellowColor,
- data: [
- {
- x: 30,
- y: 72,
- r: 5
- },
- {
- x: 40,
- y: 110,
- r: 7
- },
- {
- x: 20,
- y: 135,
- r: 6
- },
- {
- x: 10,
- y: 160,
- r: 12
- },
- {
- x: 50,
- y: 285,
- r: 5
- },
- {
- x: 60,
- y: 235,
- r: 5
- },
- {
- x: 70,
- y: 275,
- r: 7
- },
- {
- x: 80,
- y: 290,
- r: 4
- },
- {
- x: 90,
- y: 250,
- r: 10
- },
- {
- x: 100,
- y: 220,
- r: 7
- },
- {
- x: 120,
- y: 230,
- r: 4
- },
- {
- x: 110,
- y: 320,
- r: 15
- },
- {
- x: 130,
- y: 330,
- r: 7
- }
- ]
- }
- ]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
-
- scales: {
- x: {
- min: 0,
- max: 140,
- grid: {
- color: borderColor,
- drawBorder: false,
- borderColor: borderColor
- },
- ticks: {
- stepSize: 10,
- color: labelColor
- }
- },
- y: {
- min: 0,
- max: 400,
- grid: {
- color: borderColor,
- drawBorder: false,
- borderColor: borderColor
- },
- ticks: {
- stepSize: 100,
- color: labelColor
- }
- }
- },
- plugins: {
- legend: {
- display: false
- },
- tooltip: {
-
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- }
- }
- }
- });
- }
-
-
-
-
- const lineAreaChart = document.getElementById('lineAreaChart');
- if (lineAreaChart) {
- const lineAreaChartVar = new Chart(lineAreaChart, {
- type: 'line',
- data: {
- labels: [
- '7/12',
- '8/12',
- '9/12',
- '10/12',
- '11/12',
- '12/12',
- '13/12',
- '14/12',
- '15/12',
- '16/12',
- '17/12',
- '18/12',
- '19/12',
- '20/12',
- ''
- ],
- datasets: [
- {
- label: 'Africa',
- data: [40, 55, 45, 75, 65, 55, 70, 60, 100, 98, 90, 120, 125, 140, 155],
- tension: 0,
- fill: true,
- backgroundColor: blueColor,
- pointStyle: 'circle',
- borderColor: 'transparent',
- pointRadius: 0.5,
- pointHoverRadius: 5,
- pointHoverBorderWidth: 5,
- pointBorderColor: 'transparent',
- pointHoverBackgroundColor: blueColor,
- pointHoverBorderColor: cardColor
- },
- {
- label: 'Asia',
- data: [70, 85, 75, 150, 100, 140, 110, 105, 160, 150, 125, 190, 200, 240, 275],
- tension: 0,
- fill: true,
- backgroundColor: blueLightColor,
- pointStyle: 'circle',
- borderColor: 'transparent',
- pointRadius: 0.5,
- pointHoverRadius: 5,
- pointHoverBorderWidth: 5,
- pointBorderColor: 'transparent',
- pointHoverBackgroundColor: blueLightColor,
- pointHoverBorderColor: cardColor
- },
- {
- label: 'Europe',
- data: [240, 195, 160, 215, 185, 215, 185, 200, 250, 210, 195, 250, 235, 300, 315],
- tension: 0,
- fill: true,
- backgroundColor: greyLightColor,
- pointStyle: 'circle',
- borderColor: 'transparent',
- pointRadius: 0.5,
- pointHoverRadius: 5,
- pointHoverBorderWidth: 5,
- pointBorderColor: 'transparent',
- pointHoverBackgroundColor: greyLightColor,
- pointHoverBorderColor: cardColor
- }
- ]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- plugins: {
- legend: {
- position: 'top',
- rtl: isRtl,
- align: 'start',
- labels: {
- usePointStyle: true,
- padding: 35,
- boxWidth: 6,
- boxHeight: 6,
- color: legendColor
- }
- },
- tooltip: {
-
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- }
- },
- scales: {
- x: {
- grid: {
- color: 'transparent',
- borderColor: borderColor
- },
- ticks: {
- color: labelColor
- }
- },
- y: {
- min: 0,
- max: 400,
- grid: {
- color: 'transparent',
- borderColor: borderColor
- },
- ticks: {
- stepSize: 100,
- color: labelColor
- }
- }
- }
- }
- });
- }
-
-
-
-
- const doughnutChart = document.getElementById('doughnutChart');
- if (doughnutChart) {
- const doughnutChartVar = new Chart(doughnutChart, {
- type: 'doughnut',
- data: {
- labels: ['Tablet', 'Mobile', 'Desktop'],
- datasets: [
- {
- data: [10, 10, 80],
- backgroundColor: [cyanColor, orangeLightColor, config.colors.primary],
- borderWidth: 0,
- pointStyle: 'rectRounded'
- }
- ]
- },
- options: {
- responsive: true,
- animation: {
- duration: 500
- },
- cutout: '68%',
- plugins: {
- legend: {
- display: false
- },
- tooltip: {
- callbacks: {
- label: function (context) {
- const label = context.labels || '',
- value = context.parsed;
- const output = ' ' + label + ' : ' + value + ' %';
- return output;
- }
- },
-
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- }
- }
- }
- });
- }
-
-
-
-
- const scatterChart = document.getElementById('scatterChart');
- if (scatterChart) {
- const scatterChartVar = new Chart(scatterChart, {
- type: 'scatter',
- data: {
- datasets: [
- {
- label: 'iPhone',
- data: [
- {
- x: 72,
- y: 225
- },
- {
- x: 81,
- y: 270
- },
- {
- x: 90,
- y: 230
- },
- {
- x: 103,
- y: 305
- },
- {
- x: 103,
- y: 245
- },
- {
- x: 108,
- y: 275
- },
- {
- x: 110,
- y: 290
- },
- {
- x: 111,
- y: 315
- },
- {
- x: 109,
- y: 350
- },
- {
- x: 116,
- y: 340
- },
- {
- x: 113,
- y: 260
- },
- {
- x: 117,
- y: 275
- },
- {
- x: 117,
- y: 295
- },
- {
- x: 126,
- y: 280
- },
- {
- x: 127,
- y: 340
- },
- {
- x: 133,
- y: 330
- }
- ],
- backgroundColor: config.colors.primary,
- borderColor: 'transparent',
- pointBorderWidth: 2,
- pointHoverBorderWidth: 2,
- pointRadius: 5
- },
- {
- label: 'Samsung Note',
- data: [
- {
- x: 13,
- y: 95
- },
- {
- x: 22,
- y: 105
- },
- {
- x: 17,
- y: 115
- },
- {
- x: 19,
- y: 130
- },
- {
- x: 21,
- y: 125
- },
- {
- x: 35,
- y: 125
- },
- {
- x: 13,
- y: 155
- },
- {
- x: 21,
- y: 165
- },
- {
- x: 25,
- y: 155
- },
- {
- x: 18,
- y: 190
- },
- {
- x: 26,
- y: 180
- },
- {
- x: 43,
- y: 180
- },
- {
- x: 53,
- y: 202
- },
- {
- x: 61,
- y: 165
- },
- {
- x: 67,
- y: 225
- }
- ],
- backgroundColor: yellowColor,
- borderColor: 'transparent',
- pointRadius: 5
- },
- {
- label: 'OnePlus',
- data: [
- {
- x: 70,
- y: 195
- },
- {
- x: 72,
- y: 270
- },
- {
- x: 98,
- y: 255
- },
- {
- x: 100,
- y: 215
- },
- {
- x: 87,
- y: 240
- },
- {
- x: 94,
- y: 280
- },
- {
- x: 99,
- y: 300
- },
- {
- x: 102,
- y: 290
- },
- {
- x: 110,
- y: 275
- },
- {
- x: 111,
- y: 250
- },
- {
- x: 94,
- y: 280
- },
- {
- x: 92,
- y: 340
- },
- {
- x: 100,
- y: 335
- },
- {
- x: 108,
- y: 330
- }
- ],
- backgroundColor: cyanColor,
- borderColor: 'transparent',
- pointBorderWidth: 2,
- pointHoverBorderWidth: 2,
- pointRadius: 5
- }
- ]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- animation: {
- duration: 800
- },
- plugins: {
- legend: {
- position: 'top',
- rtl: isRtl,
- align: 'start',
- labels: {
- usePointStyle: true,
- padding: 25,
- boxWidth: 6,
- boxHeight: 6,
- color: legendColor
- }
- },
- tooltip: {
-
- rtl: isRtl,
- backgroundColor: cardColor,
- titleColor: headingColor,
- bodyColor: legendColor,
- borderWidth: 1,
- borderColor: borderColor
- }
- },
- scales: {
- x: {
- min: 0,
- max: 140,
- grid: {
- color: borderColor,
- drawTicks: false,
- drawBorder: false,
- borderColor: borderColor
- },
- ticks: {
- stepSize: 10,
- color: labelColor
- }
- },
- y: {
- min: 0,
- max: 400,
- grid: {
- color: borderColor,
- drawTicks: false,
- drawBorder: false,
- borderColor: borderColor
- },
- ticks: {
- stepSize: 100,
- color: labelColor
- }
- }
- }
- }
- });
- }
- })();
|