123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747 |
- //[widget charts Javascript]
- //Project: Unique Admin - Responsive Admin Template
- //Primary use: Used only for the widget charts
- $( document ).ready(function() {
- "use strict";
-
- if( $('#bubble-chart').length > 0 ){
- var ctx5 = document.getElementById("bubble-chart").getContext("2d");
- var data5 = {
- datasets: [
- {
- label: 'First Dataset',
- data: [
- {
- x: 80,
- y: 60,
- r: 10
- },
- {
- x: 40,
- y: 40,
- r: 10
- },
- {
- x: 30,
- y: 40,
- r: 20
- },
- {
- x: 20,
- y: 10,
- r: 10
- },
- {
- x: 50,
- y: 30,
- r: 10
- }
- ],
- backgroundColor:"#689f38",
- hoverBackgroundColor: "#33691e",
- },
- {
- label: 'Second Dataset',
- data: [
- {
- x: 40,
- y: 30,
- r: 10
- },
- {
- x: 25,
- y: 20,
- r: 10
- },
- {
- x: 35,
- y: 30,
- r: 10
- }
- ],
- backgroundColor:"#38649f",
- hoverBackgroundColor: "#244674",
- }]
- };
-
- var bubbleChart = new Chart(ctx5,{
- type:"bubble",
- data:data5,
- options: {
- elements: {
- points: {
- borderWidth: 1,
- borderColor: 'rgb(33, 33, 33)'
- }
- },
- scales: {
- xAxes: [
- {
- ticks: {
- min: -10,
- max: 100,
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- },
- gridLines: {
- color: "rgba(135,135,135,0)",
- }
- }],
- yAxes: [
- {
- ticks: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- },
- gridLines: {
- color: "rgba(135,135,135,0)",
- }
- }]
- },
- animation: {
- duration: 3000
- },
- responsive: true,
- legend: {
- labels: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- },
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- }
- }
- });
- }
- if( $('#pie-chart').length > 0 ){
- var ctx6 = document.getElementById("pie-chart").getContext("2d");
- var data6 = {
- labels: [
- "lab 1",
- "lab 2",
- "lab 3"
- ],
- datasets: [
- {
- data: [300, 50, 100],
- backgroundColor: [
- "#689f38",
- "#38649f",
- "#389f99"
- ],
- hoverBackgroundColor: [
- "#33691e",
- "#244674",
- "#18625e"
- ]
- }]
- };
-
- var pieChart = new Chart(ctx6,{
- type: 'pie',
- data: data6,
- options: {
- animation: {
- duration: 3000
- },
- responsive: true,
- legend: {
- labels: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- },
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- },
- elements: {
- arc: {
- borderWidth: 0
- }
- }
- }
- });
- }
- if( $('#doughnut-chart').length > 0 ){
- var ctx7 = document.getElementById("doughnut-chart").getContext("2d");
- var data7 = {
- labels: [
- "lab 1",
- "lab 2",
- "lab 3"
- ],
- datasets: [
- {
- data: [300, 50, 100],
- backgroundColor: [
- "#389f99",
- "#ee1044",
- "#ff8f00"
- ],
- hoverBackgroundColor: [
- "#18625e",
- "#b31338",
- "#c0720f"
- ]
- }]
- };
-
- var doughnutChart = new Chart(ctx7, {
- type: 'doughnut',
- data: data7,
- options: {
- animation: {
- duration: 3000
- },
- responsive: true,
- legend: {
- labels: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- },
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- },
- elements: {
- arc: {
- borderWidth: 0
- }
- }
- }
- });
- }
-
- // Bar chart
- new Chart(document.getElementById("bar-chart1"), {
- type: 'bar',
- data: {
- labels: ["January", "February", "March", "April", "May"],
- datasets: [
- {
- label: "Dataset",
- backgroundColor: ["#689f38", "#38649f","#389f99","#ee1044","#ff8f00"],
- data: [8545,6589,5894,4985,1548]
- }
- ]
- },
- options: {
- legend: { display: false },
- title: {
- display: true,
- text: 'My dataset'
- }
- }
- });
-
- if( $('#bar-chart2').length > 0 ){
- var ctx2 = document.getElementById("bar-chart2").getContext("2d");
- var data2 = {
- labels: ["January", "February", "March", "April", "May", "June", "July"],
- datasets: [
- {
- label: "My First dataset",
- backgroundColor: "#689f38",
- borderColor: "#689f38",
- data: [15, 20, 70, 51, 36, 85, 50]
- },
- {
- label: "My Second dataset",
- backgroundColor: "#38649f",
- borderColor: "#38649f",
- data: [28, 48, 40, 19, 86, 27, 90]
- },
- {
- label: "My Third dataset",
- backgroundColor: "#389f99",
- borderColor: "#389f99",
- data: [8, 28, 50, 29, 76, 77, 40]
- }
- ]
- };
-
- var hBar = new Chart(ctx2, {
- type:"bar",
- data:data2,
-
- options: {
- tooltips: {
- mode:"label"
- },
- scales: {
- yAxes: [{
- stacked: true,
- gridLines: {
- color: "rgba(135,135,135,0)",
- },
- ticks: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- }],
- xAxes: [{
- stacked: true,
- gridLines: {
- color: "rgba(135,135,135,0)",
- },
- ticks: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- }],
-
- },
- elements:{
- point: {
- hitRadius:40
- }
- },
- animation: {
- duration: 3000
- },
- responsive: true,
- maintainAspectRatio:false,
- legend: {
- display: false,
- },
-
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- }
-
- }
- });
- };
- // Horizental Bar Chart
- new Chart(document.getElementById("bar-chart-horizontal1"), {
- type: 'horizontalBar',
- data: {
- labels: ["January", "February", "March", "April", "May"],
- datasets: [
- {
- label: "Dataset",
- backgroundColor: ["#689f38", "#38649f","#389f99","#ee1044","#ff8f00"],
- data: [8545,6589,5894,4985,1548]
- }
- ]
- },
- options: {
- legend: { display: false },
- title: {
- display: true,
- text: 'My dataset'
- }
- }
- });
-
- if( $('#bar-chart-horizontal2').length > 0 ){
- var ctx2 = document.getElementById("bar-chart-horizontal2").getContext("2d");
- var data2 = {
- labels: ["January", "February", "March", "April", "May", "June", "July"],
- datasets: [
- {
- label: "My First dataset",
- backgroundColor: "#689f38",
- borderColor: "#689f38",
- data: [10, 59, 40, 75, 50, 45, 80]
- },
- {
- label: "My Second dataset",
- backgroundColor: "#38649f",
- borderColor: "#38649f",
- data: [48, 88, 50, 58, 34, 67, 65]
- }
- ]
- };
-
- var hBar = new Chart(ctx2, {
- type:"horizontalBar",
- data:data2,
-
- options: {
- tooltips: {
- mode:"label"
- },
- scales: {
- yAxes: [{
- stacked: true,
- gridLines: {
- color: "rgba(135,135,135,0)",
- },
- ticks: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- }],
- xAxes: [{
- stacked: true,
- gridLines: {
- color: "rgba(135,135,135,0)",
- },
- ticks: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- }],
-
- },
- elements:{
- point: {
- hitRadius:40
- }
- },
- animation: {
- duration: 3000
- },
- responsive: true,
- legend: {
- display: false,
- },
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- }
-
- }
- });
- }
- //Polar Chart
- new Chart(document.getElementById("polar-chart1"), {
- type: 'polarArea',
- data: {
- labels: ["January", "February", "March", "April"],
- datasets: [
- {
- label: "Dataset",
- backgroundColor: ["#689f38", "#38649f","#389f99","#ee1044","#ff8f00"],
- data: [2584,5698,5987,3485]
- }
- ]
- },
- options: {
- title: {
- display: true,
- text: 'Mt Dataset'
- }
- }
- });
- if( $('#polar-chart2').length > 0 ){
- var ctx4 = document.getElementById("polar-chart2").getContext("2d");
- var data4 = {
- datasets: [{
- data: [
- 11,
- 16,
- 7,
- 3,
- 14
- ],
- backgroundColor: [
- "#689f38",
- "#38649f",
- "#389f99",
- "#ee1044",
- "#ff8f00"
- ],
- hoverBackgroundColor: [
- "#33691e",
- "#244674",
- "#18625e",
- "#b31338",
- "#c0720f"
- ],
- label: 'My dataset' // for legend
- }],
- labels: [
- "lab 1",
- "lab 2",
- "lab 3",
- "lab 4",
- "lab 5"
- ]
- };
- var polarChart = new Chart(ctx4, {
- type: "polarArea",
- data: data4,
- options: {
- elements: {
- arc: {
- borderColor: "#fff",
- borderWidth: 0
- }
- },
- scale: {
- ticks: {
- beginAtZero: true,
- fontFamily: "Nunito Sans",
-
- },
- gridLines: {
- color: "rgba(135,135,135,0)",
- }
- },
- animation: {
- duration: 3000
- },
- responsive: true,
- legend: {
- labels: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- },
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- }
- }
- });
- }
- //Radar chart
- new Chart(document.getElementById("radar-chart1"), {
- type: 'radar',
- data: {
- labels: ["January", "February", "March", "April", "May"],
- datasets: [
- {
- label: "250",
- fill: true,
- backgroundColor: "rgba(179,181,198,0.2)",
- borderColor: "rgba(179,181,198,1)",
- pointBorderColor: "#fff",
- pointBackgroundColor: "rgba(179,181,198,1)",
- data: [8.77,55.61,21.69,6.62,6.82]
- }, {
- label: "4050",
- fill: true,
- backgroundColor: "rgba(239, 72, 62, 0.2)",
- borderColor: "rgba(239, 72, 62, 1)",
- pointBorderColor: "#fff",
- pointBackgroundColor: "#ff4c52",
- pointBorderColor: "#fff",
- data: [25.48,54.16,7.61,8.06,4.45]
- }
- ]
- },
- options: {
- title: {
- display: true,
- text: 'My dataset'
- }
- }
- });
- if( $('#radar-chart2').length > 0 ){
- var ctx3 = document.getElementById("radar-chart2").getContext("2d");
- var data3 = {
- labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
- datasets: [
- {
- label: "My First dataset",
- backgroundColor: "rgba(116, 96, 238, 0.6)",
- borderColor: "rgba(116, 96, 238, 0.6)",
- pointBackgroundColor: "rgba(116, 96, 238, 0.6)",
- pointBorderColor: "#fff",
- pointHoverBackgroundColor: "#fff",
- pointHoverBorderColor: "rgba(116, 96, 238, 0.6)",
- data: [65, 59, 90, 81, 56, 55, 40]
- },
- {
- label: "My Second dataset",
- backgroundColor: "rgba(57, 139, 247, 1)",
- borderColor: "rgba(57, 139, 247, 1)",
- pointBackgroundColor: "rgba(57, 139, 247, 1)",
- pointBorderColor: "#fff",
- pointHoverBackgroundColor: "#fff",
- pointHoverBorderColor: "rgba(57, 139, 247, 1)",
- data: [28, 48, 40, 19, 96, 27, 100]
- }
- ]
- };
- var radarChart = new Chart(ctx3, {
- type: "radar",
- data: data3,
- options: {
- scale: {
- ticks: {
- beginAtZero: true,
- fontFamily: "Nunito Sans",
-
- },
- gridLines: {
- color: "rgba(135,135,135,0)",
- },
- pointLabels:{
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- },
- },
-
- animation: {
- duration: 3000
- },
- responsive: true,
- legend: {
- labels: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- },
- elements: {
- arc: {
- borderWidth: 0
- }
- },
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- }
- }
- });
- }
- //Line Chart
-
- new Chart(document.getElementById("line-chart1"), {
- type: 'line',
- data: {
- labels: [4500,3500,3200,3050,2700,2450,2200,1750,1499,2050],
- datasets: [{
- data: [86,114,106,106,107,111,133,221,783,2478],
- label: "January",
- borderColor: "#689f38",
- fill: false
- }, {
- data: [282,350,411,502,635,809,947,1402,3700,5267],
- label: "February",
- borderColor: "#38649f",
- fill: false
- }, {
- data: [168,170,178,190,203,276,408,547,675,734],
- label: "March",
- borderColor: "#389f99",
- fill: false
- }, {
- data: [40,20,10,16,24,38,74,167,508,784],
- label: "April",
- borderColor: "#ee1044",
- fill: false
- }, {
- data: [6,3,2,2,7,26,82,172,312,433],
- label: "May",
- borderColor: "#ff8f00",
- fill: false
- }
- ]
- },
- options: {
- title: {
- display: true,
- text: 'My Dateset'
- }
- }
- });
-
- if( $('#line-chart2').length > 0 ){
- var ctx1 = document.getElementById("line-chart2").getContext("2d");
- var data1 = {
- labels: ["January", "February", "March", "April", "May", "June", "July"],
- datasets: [
- {
- label: "fir",
- backgroundColor: "#ff8f00",
- borderColor: "#ff8f00",
- pointBorderColor: "#ff8f00",
- pointHighlightStroke: "#ff8f00",
- data: [0, 59, 40, 75, 50, 45, 80]
- },
- {
- label: "sec",
- backgroundColor: "#ee1044",
- borderColor: "#ee1044",
- pointBorderColor: "#ee1044",
- pointBackgroundColor: "#ee1044",
- data: [48, 88, 50, 58, 34, 67, 65],
- }
-
- ]
- };
-
- var areaChart = new Chart(ctx1, {
- type:"line",
- data:data1,
-
- options: {
- tooltips: {
- mode:"label"
- },
- elements:{
- point: {
- hitRadius:90
- }
- },
-
- scales: {
- yAxes: [{
- stacked: true,
- gridLines: {
- color: "rgba(135,135,135,0)",
- },
- ticks: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- }],
- xAxes: [{
- stacked: true,
- gridLines: {
- color: "rgba(135,135,135,0)",
- },
- ticks: {
- fontFamily: "Nunito Sans",
- fontColor:"#878787"
- }
- }]
- },
- animation: {
- duration: 3000
- },
- responsive: true,
- legend: {
- display: false,
- },
- tooltip: {
- backgroundColor:'rgba(33,33,33,1)',
- cornerRadius:0,
- footerFontFamily:"'Nunito Sans'"
- }
-
- }
- });
- }
-
- }); // End of use strict
|