Subversion-Projekte lars-tiefland.webanos.zeldi.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
4 lars 1
 
2
(function ($) {
3
  // USE STRICT
4
  "use strict";
5
 
6
  try {
7
    //WidgetChart 1
8
    var ctx = document.getElementById("widgetChart1");
9
    if (ctx) {
10
      ctx.height = 130;
11
      var myChart = new Chart(ctx, {
12
        type: 'line',
13
        data: {
14
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
15
          type: 'line',
16
          datasets: [{
17
            data: [78, 81, 80, 45, 34, 12, 40],
18
            label: 'Dataset',
19
            backgroundColor: 'rgba(255,255,255,.1)',
20
            borderColor: 'rgba(255,255,255,.55)',
21
          },]
22
        },
23
        options: {
24
          maintainAspectRatio: true,
25
          legend: {
26
            display: false
27
          },
28
          layout: {
29
            padding: {
30
              left: 0,
31
              right: 0,
32
              top: 0,
33
              bottom: 0
34
            }
35
          },
36
          responsive: true,
37
          scales: {
38
            xAxes: [{
39
              gridLines: {
40
                color: 'transparent',
41
                zeroLineColor: 'transparent'
42
              },
43
              ticks: {
44
                fontSize: 2,
45
                fontColor: 'transparent'
46
              }
47
            }],
48
            yAxes: [{
49
              display: false,
50
              ticks: {
51
                display: false,
52
              }
53
            }]
54
          },
55
          title: {
56
            display: false,
57
          },
58
          elements: {
59
            line: {
60
              borderWidth: 0
61
            },
62
            point: {
63
              radius: 0,
64
              hitRadius: 10,
65
              hoverRadius: 4
66
            }
67
          }
68
        }
69
      });
70
    }
71
 
72
 
73
    //WidgetChart 2
74
    var ctx = document.getElementById("widgetChart2");
75
    if (ctx) {
76
      ctx.height = 130;
77
      var myChart = new Chart(ctx, {
78
        type: 'line',
79
        data: {
80
          labels: ['January', 'February', 'March', 'April', 'May', 'June'],
81
          type: 'line',
82
          datasets: [{
83
            data: [1, 18, 9, 17, 34, 22],
84
            label: 'Dataset',
85
            backgroundColor: 'transparent',
86
            borderColor: 'rgba(255,255,255,.55)',
87
          },]
88
        },
89
        options: {
90
 
91
          maintainAspectRatio: false,
92
          legend: {
93
            display: false
94
          },
95
          responsive: true,
96
          tooltips: {
97
            mode: 'index',
98
            titleFontSize: 12,
99
            titleFontColor: '#000',
100
            bodyFontColor: '#000',
101
            backgroundColor: '#fff',
102
            titleFontFamily: 'Montserrat',
103
            bodyFontFamily: 'Montserrat',
104
            cornerRadius: 3,
105
            intersect: false,
106
          },
107
          scales: {
108
            xAxes: [{
109
              gridLines: {
110
                color: 'transparent',
111
                zeroLineColor: 'transparent'
112
              },
113
              ticks: {
114
                fontSize: 2,
115
                fontColor: 'transparent'
116
              }
117
            }],
118
            yAxes: [{
119
              display: false,
120
              ticks: {
121
                display: false,
122
              }
123
            }]
124
          },
125
          title: {
126
            display: false,
127
          },
128
          elements: {
129
            line: {
130
              tension: 0.00001,
131
              borderWidth: 1
132
            },
133
            point: {
134
              radius: 4,
135
              hitRadius: 10,
136
              hoverRadius: 4
137
            }
138
          }
139
        }
140
      });
141
    }
142
 
143
 
144
    //WidgetChart 3
145
    var ctx = document.getElementById("widgetChart3");
146
    if (ctx) {
147
      ctx.height = 130;
148
      var myChart = new Chart(ctx, {
149
        type: 'line',
150
        data: {
151
          labels: ['January', 'February', 'March', 'April', 'May', 'June'],
152
          type: 'line',
153
          datasets: [{
154
            data: [65, 59, 84, 84, 51, 55],
155
            label: 'Dataset',
156
            backgroundColor: 'transparent',
157
            borderColor: 'rgba(255,255,255,.55)',
158
          },]
159
        },
160
        options: {
161
 
162
          maintainAspectRatio: false,
163
          legend: {
164
            display: false
165
          },
166
          responsive: true,
167
          tooltips: {
168
            mode: 'index',
169
            titleFontSize: 12,
170
            titleFontColor: '#000',
171
            bodyFontColor: '#000',
172
            backgroundColor: '#fff',
173
            titleFontFamily: 'Montserrat',
174
            bodyFontFamily: 'Montserrat',
175
            cornerRadius: 3,
176
            intersect: false,
177
          },
178
          scales: {
179
            xAxes: [{
180
              gridLines: {
181
                color: 'transparent',
182
                zeroLineColor: 'transparent'
183
              },
184
              ticks: {
185
                fontSize: 2,
186
                fontColor: 'transparent'
187
              }
188
            }],
189
            yAxes: [{
190
              display: false,
191
              ticks: {
192
                display: false,
193
              }
194
            }]
195
          },
196
          title: {
197
            display: false,
198
          },
199
          elements: {
200
            line: {
201
              borderWidth: 1
202
            },
203
            point: {
204
              radius: 4,
205
              hitRadius: 10,
206
              hoverRadius: 4
207
            }
208
          }
209
        }
210
      });
211
    }
212
 
213
 
214
    //WidgetChart 4
215
    var ctx = document.getElementById("widgetChart4");
216
    if (ctx) {
217
      ctx.height = 115;
218
      var myChart = new Chart(ctx, {
219
        type: 'bar',
220
        data: {
221
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
222
          datasets: [
223
            {
224
              label: "My First dataset",
225
              data: [78, 81, 80, 65, 58, 75, 60, 75, 65, 60, 60, 75],
226
              borderColor: "transparent",
227
              borderWidth: "0",
228
              backgroundColor: "rgba(255,255,255,.3)"
229
            }
230
          ]
231
        },
232
        options: {
233
          maintainAspectRatio: true,
234
          legend: {
235
            display: false
236
          },
237
          scales: {
238
            xAxes: [{
239
              display: false,
240
              categoryPercentage: 1,
241
              barPercentage: 0.65
242
            }],
243
            yAxes: [{
244
              display: false
245
            }]
246
          }
247
        }
248
      });
249
    }
250
 
251
    // Recent Report
252
    const brandProduct = 'rgba(0,181,233,0.8)'
253
    const brandService = 'rgba(0,173,95,0.8)'
254
 
255
    var elements = 10
256
    var data1 = [52, 60, 55, 50, 65, 80, 57, 70, 105, 115]
257
    var data2 = [102, 70, 80, 100, 56, 53, 80, 75, 65, 90]
258
 
259
    var ctx = document.getElementById("recent-rep-chart");
260
    if (ctx) {
261
      ctx.height = 250;
262
      var myChart = new Chart(ctx, {
263
        type: 'line',
264
        data: {
265
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', ''],
266
          datasets: [
267
            {
268
              label: 'My First dataset',
269
              backgroundColor: brandService,
270
              borderColor: 'transparent',
271
              pointHoverBackgroundColor: '#fff',
272
              borderWidth: 0,
273
              data: data1
274
 
275
            },
276
            {
277
              label: 'My Second dataset',
278
              backgroundColor: brandProduct,
279
              borderColor: 'transparent',
280
              pointHoverBackgroundColor: '#fff',
281
              borderWidth: 0,
282
              data: data2
283
 
284
            }
285
          ]
286
        },
287
        options: {
288
          maintainAspectRatio: true,
289
          legend: {
290
            display: false
291
          },
292
          responsive: true,
293
          scales: {
294
            xAxes: [{
295
              gridLines: {
296
                drawOnChartArea: true,
297
                color: '#f2f2f2'
298
              },
299
              ticks: {
300
                fontFamily: "Poppins",
301
                fontSize: 12
302
              }
303
            }],
304
            yAxes: [{
305
              ticks: {
306
                beginAtZero: true,
307
                maxTicksLimit: 5,
308
                stepSize: 50,
309
                max: 150,
310
                fontFamily: "Poppins",
311
                fontSize: 12
312
              },
313
              gridLines: {
314
                display: true,
315
                color: '#f2f2f2'
316
 
317
              }
318
            }]
319
          },
320
          elements: {
321
            point: {
322
              radius: 0,
323
              hitRadius: 10,
324
              hoverRadius: 4,
325
              hoverBorderWidth: 3
326
            }
327
          }
328
 
329
 
330
        }
331
      });
332
    }
333
 
334
    // Percent Chart
335
    var ctx = document.getElementById("percent-chart");
336
    if (ctx) {
337
      ctx.height = 280;
338
      var myChart = new Chart(ctx, {
339
        type: 'doughnut',
340
        data: {
341
          datasets: [
342
            {
343
              label: "My First dataset",
344
              data: [60, 40],
345
              backgroundColor: [
346
                '#00b5e9',
347
                '#fa4251'
348
              ],
349
              hoverBackgroundColor: [
350
                '#00b5e9',
351
                '#fa4251'
352
              ],
353
              borderWidth: [
354
                0, 0
355
              ],
356
              hoverBorderColor: [
357
                'transparent',
358
                'transparent'
359
              ]
360
            }
361
          ],
362
          labels: [
363
            'Products',
364
            'Services'
365
          ]
366
        },
367
        options: {
368
          maintainAspectRatio: false,
369
          responsive: true,
370
          cutoutPercentage: 55,
371
          animation: {
372
            animateScale: true,
373
            animateRotate: true
374
          },
375
          legend: {
376
            display: false
377
          },
378
          tooltips: {
379
            titleFontFamily: "Poppins",
380
            xPadding: 15,
381
            yPadding: 10,
382
            caretPadding: 0,
383
            bodyFontSize: 16
384
          }
385
        }
386
      });
387
    }
388
 
389
  } catch (error) {
390
    console.log(error);
391
  }
392
 
393
 
394
 
395
  try {
396
 
397
    // Recent Report 2
398
    const bd_brandProduct2 = 'rgba(0,181,233,0.9)'
399
    const bd_brandService2 = 'rgba(0,173,95,0.9)'
400
    const brandProduct2 = 'rgba(0,181,233,0.2)'
401
    const brandService2 = 'rgba(0,173,95,0.2)'
402
 
403
    var data3 = [52, 60, 55, 50, 65, 80, 57, 70, 105, 115]
404
    var data4 = [102, 70, 80, 100, 56, 53, 80, 75, 65, 90]
405
 
406
    var ctx = document.getElementById("recent-rep2-chart");
407
    if (ctx) {
408
      ctx.height = 230;
409
      var myChart = new Chart(ctx, {
410
        type: 'line',
411
        data: {
412
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', ''],
413
          datasets: [
414
            {
415
              label: 'My First dataset',
416
              backgroundColor: brandService2,
417
              borderColor: bd_brandService2,
418
              pointHoverBackgroundColor: '#fff',
419
              borderWidth: 0,
420
              data: data3
421
 
422
            },
423
            {
424
              label: 'My Second dataset',
425
              backgroundColor: brandProduct2,
426
              borderColor: bd_brandProduct2,
427
              pointHoverBackgroundColor: '#fff',
428
              borderWidth: 0,
429
              data: data4
430
 
431
            }
432
          ]
433
        },
434
        options: {
435
          maintainAspectRatio: true,
436
          legend: {
437
            display: false
438
          },
439
          responsive: true,
440
          scales: {
441
            xAxes: [{
442
              gridLines: {
443
                drawOnChartArea: true,
444
                color: '#f2f2f2'
445
              },
446
              ticks: {
447
                fontFamily: "Poppins",
448
                fontSize: 12
449
              }
450
            }],
451
            yAxes: [{
452
              ticks: {
453
                beginAtZero: true,
454
                maxTicksLimit: 5,
455
                stepSize: 50,
456
                max: 150,
457
                fontFamily: "Poppins",
458
                fontSize: 12
459
              },
460
              gridLines: {
461
                display: true,
462
                color: '#f2f2f2'
463
 
464
              }
465
            }]
466
          },
467
          elements: {
468
            point: {
469
              radius: 0,
470
              hitRadius: 10,
471
              hoverRadius: 4,
472
              hoverBorderWidth: 3
473
            },
474
            line: {
475
              tension: 0
476
            }
477
          }
478
 
479
 
480
        }
481
      });
482
    }
483
 
484
  } catch (error) {
485
    console.log(error);
486
  }
487
 
488
 
489
  try {
490
 
491
    // Recent Report 3
492
    const bd_brandProduct3 = 'rgba(0,181,233,0.9)';
493
    const bd_brandService3 = 'rgba(0,173,95,0.9)';
494
    const brandProduct3 = 'transparent';
495
    const brandService3 = 'transparent';
496
 
497
    var data5 = [52, 60, 55, 50, 65, 80, 57, 115];
498
    var data6 = [102, 70, 80, 100, 56, 53, 80, 90];
499
 
500
    var ctx = document.getElementById("recent-rep3-chart");
501
    if (ctx) {
502
      ctx.height = 230;
503
      var myChart = new Chart(ctx, {
504
        type: 'line',
505
        data: {
506
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', ''],
507
          datasets: [
508
            {
509
              label: 'My First dataset',
510
              backgroundColor: brandService3,
511
              borderColor: bd_brandService3,
512
              pointHoverBackgroundColor: '#fff',
513
              borderWidth: 0,
514
              data: data5,
515
              pointBackgroundColor: bd_brandService3
516
            },
517
            {
518
              label: 'My Second dataset',
519
              backgroundColor: brandProduct3,
520
              borderColor: bd_brandProduct3,
521
              pointHoverBackgroundColor: '#fff',
522
              borderWidth: 0,
523
              data: data6,
524
              pointBackgroundColor: bd_brandProduct3
525
 
526
            }
527
          ]
528
        },
529
        options: {
530
          maintainAspectRatio: false,
531
          legend: {
532
            display: false
533
          },
534
          responsive: true,
535
          scales: {
536
            xAxes: [{
537
              gridLines: {
538
                drawOnChartArea: true,
539
                color: '#f2f2f2'
540
              },
541
              ticks: {
542
                fontFamily: "Poppins",
543
                fontSize: 12
544
              }
545
            }],
546
            yAxes: [{
547
              ticks: {
548
                beginAtZero: true,
549
                maxTicksLimit: 5,
550
                stepSize: 50,
551
                max: 150,
552
                fontFamily: "Poppins",
553
                fontSize: 12
554
              },
555
              gridLines: {
556
                display: false,
557
                color: '#f2f2f2'
558
              }
559
            }]
560
          },
561
          elements: {
562
            point: {
563
              radius: 3,
564
              hoverRadius: 4,
565
              hoverBorderWidth: 3,
566
              backgroundColor: '#333'
567
            }
568
          }
569
 
570
 
571
        }
572
      });
573
    }
574
 
575
  } catch (error) {
576
    console.log(error);
577
  }
578
 
579
  try {
580
    //WidgetChart 5
581
    var ctx = document.getElementById("widgetChart5");
582
    if (ctx) {
583
      ctx.height = 220;
584
      var myChart = new Chart(ctx, {
585
        type: 'bar',
586
        data: {
587
          labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
588
          datasets: [
589
            {
590
              label: "My First dataset",
591
              data: [78, 81, 80, 64, 65, 80, 70, 75, 67, 85, 66, 68],
592
              borderColor: "transparent",
593
              borderWidth: "0",
594
              backgroundColor: "#ccc",
595
            }
596
          ]
597
        },
598
        options: {
599
          maintainAspectRatio: true,
600
          legend: {
601
            display: false
602
          },
603
          scales: {
604
            xAxes: [{
605
              display: false,
606
              categoryPercentage: 1,
607
              barPercentage: 0.65
608
            }],
609
            yAxes: [{
610
              display: false
611
            }]
612
          }
613
        }
614
      });
615
    }
616
 
617
  } catch (error) {
618
    console.log(error);
619
  }
620
 
621
  try {
622
 
623
    // Percent Chart 2
624
    var ctx = document.getElementById("percent-chart2");
625
    if (ctx) {
626
      ctx.height = 209;
627
      var myChart = new Chart(ctx, {
628
        type: 'doughnut',
629
        data: {
630
          datasets: [
631
            {
632
              label: "My First dataset",
633
              data: [60, 40],
634
              backgroundColor: [
635
                '#00b5e9',
636
                '#fa4251'
637
              ],
638
              hoverBackgroundColor: [
639
                '#00b5e9',
640
                '#fa4251'
641
              ],
642
              borderWidth: [
643
                0, 0
644
              ],
645
              hoverBorderColor: [
646
                'transparent',
647
                'transparent'
648
              ]
649
            }
650
          ],
651
          labels: [
652
            'Products',
653
            'Services'
654
          ]
655
        },
656
        options: {
657
          maintainAspectRatio: false,
658
          responsive: true,
659
          cutoutPercentage: 87,
660
          animation: {
661
            animateScale: true,
662
            animateRotate: true
663
          },
664
          legend: {
665
            display: false,
666
            position: 'bottom',
667
            labels: {
668
              fontSize: 14,
669
              fontFamily: "Poppins,sans-serif"
670
            }
671
 
672
          },
673
          tooltips: {
674
            titleFontFamily: "Poppins",
675
            xPadding: 15,
676
            yPadding: 10,
677
            caretPadding: 0,
678
            bodyFontSize: 16,
679
          }
680
        }
681
      });
682
    }
683
 
684
  } catch (error) {
685
    console.log(error);
686
  }
687
 
688
  try {
689
    //Sales chart
690
    var ctx = document.getElementById("sales-chart");
691
    if (ctx) {
692
      ctx.height = 150;
693
      var myChart = new Chart(ctx, {
694
        type: 'line',
695
        data: {
696
          labels: ["2010", "2011", "2012", "2013", "2014", "2015", "2016"],
697
          type: 'line',
698
          defaultFontFamily: 'Poppins',
699
          datasets: [{
700
            label: "Foods",
701
            data: [0, 30, 10, 120, 50, 63, 10],
702
            backgroundColor: 'transparent',
703
            borderColor: 'rgba(220,53,69,0.75)',
704
            borderWidth: 3,
705
            pointStyle: 'circle',
706
            pointRadius: 5,
707
            pointBorderColor: 'transparent',
708
            pointBackgroundColor: 'rgba(220,53,69,0.75)',
709
          }, {
710
            label: "Electronics",
711
            data: [0, 50, 40, 80, 40, 79, 120],
712
            backgroundColor: 'transparent',
713
            borderColor: 'rgba(40,167,69,0.75)',
714
            borderWidth: 3,
715
            pointStyle: 'circle',
716
            pointRadius: 5,
717
            pointBorderColor: 'transparent',
718
            pointBackgroundColor: 'rgba(40,167,69,0.75)',
719
          }]
720
        },
721
        options: {
722
          responsive: true,
723
          tooltips: {
724
            mode: 'index',
725
            titleFontSize: 12,
726
            titleFontColor: '#000',
727
            bodyFontColor: '#000',
728
            backgroundColor: '#fff',
729
            titleFontFamily: 'Poppins',
730
            bodyFontFamily: 'Poppins',
731
            cornerRadius: 3,
732
            intersect: false,
733
          },
734
          legend: {
735
            display: false,
736
            labels: {
737
              usePointStyle: true,
738
              fontFamily: 'Poppins',
739
            },
740
          },
741
          scales: {
742
            xAxes: [{
743
              display: true,
744
              gridLines: {
745
                display: false,
746
                drawBorder: false
747
              },
748
              scaleLabel: {
749
                display: false,
750
                labelString: 'Month'
751
              },
752
              ticks: {
753
                fontFamily: "Poppins"
754
              }
755
            }],
756
            yAxes: [{
757
              display: true,
758
              gridLines: {
759
                display: false,
760
                drawBorder: false
761
              },
762
              scaleLabel: {
763
                display: true,
764
                labelString: 'Value',
765
                fontFamily: "Poppins"
766
 
767
              },
768
              ticks: {
769
                fontFamily: "Poppins"
770
              }
771
            }]
772
          },
773
          title: {
774
            display: false,
775
            text: 'Normal Legend'
776
          }
777
        }
778
      });
779
    }
780
 
781
 
782
  } catch (error) {
783
    console.log(error);
784
  }
785
 
786
  try {
787
 
788
    //Team chart
789
    var ctx = document.getElementById("team-chart");
790
    if (ctx) {
791
      ctx.height = 150;
792
      var myChart = new Chart(ctx, {
793
        type: 'line',
794
        data: {
795
          labels: ["2010", "2011", "2012", "2013", "2014", "2015", "2016"],
796
          type: 'line',
797
          defaultFontFamily: 'Poppins',
798
          datasets: [{
799
            data: [0, 7, 3, 5, 2, 10, 7],
800
            label: "Expense",
801
            backgroundColor: 'rgba(0,103,255,.15)',
802
            borderColor: 'rgba(0,103,255,0.5)',
803
            borderWidth: 3.5,
804
            pointStyle: 'circle',
805
            pointRadius: 5,
806
            pointBorderColor: 'transparent',
807
            pointBackgroundColor: 'rgba(0,103,255,0.5)',
808
          },]
809
        },
810
        options: {
811
          responsive: true,
812
          tooltips: {
813
            mode: 'index',
814
            titleFontSize: 12,
815
            titleFontColor: '#000',
816
            bodyFontColor: '#000',
817
            backgroundColor: '#fff',
818
            titleFontFamily: 'Poppins',
819
            bodyFontFamily: 'Poppins',
820
            cornerRadius: 3,
821
            intersect: false,
822
          },
823
          legend: {
824
            display: false,
825
            position: 'top',
826
            labels: {
827
              usePointStyle: true,
828
              fontFamily: 'Poppins',
829
            },
830
 
831
 
832
          },
833
          scales: {
834
            xAxes: [{
835
              display: true,
836
              gridLines: {
837
                display: false,
838
                drawBorder: false
839
              },
840
              scaleLabel: {
841
                display: false,
842
                labelString: 'Month'
843
              },
844
              ticks: {
845
                fontFamily: "Poppins"
846
              }
847
            }],
848
            yAxes: [{
849
              display: true,
850
              gridLines: {
851
                display: false,
852
                drawBorder: false
853
              },
854
              scaleLabel: {
855
                display: true,
856
                labelString: 'Value',
857
                fontFamily: "Poppins"
858
              },
859
              ticks: {
860
                fontFamily: "Poppins"
861
              }
862
            }]
863
          },
864
          title: {
865
            display: false,
866
          }
867
        }
868
      });
869
    }
870
 
871
 
872
  } catch (error) {
873
    console.log(error);
874
  }
875
 
876
  try {
877
    //bar chart
878
    var ctx = document.getElementById("barChart");
879
    if (ctx) {
880
      ctx.height = 200;
881
      var myChart = new Chart(ctx, {
882
        type: 'bar',
883
        defaultFontFamily: 'Poppins',
884
        data: {
885
          labels: ["January", "February", "March", "April", "May", "June", "July"],
886
          datasets: [
887
            {
888
              label: "My First dataset",
889
              data: [65, 59, 80, 81, 56, 55, 40],
890
              borderColor: "rgba(0, 123, 255, 0.9)",
891
              borderWidth: "0",
892
              backgroundColor: "rgba(0, 123, 255, 0.5)",
893
              fontFamily: "Poppins"
894
            },
895
            {
896
              label: "My Second dataset",
897
              data: [28, 48, 40, 19, 86, 27, 90],
898
              borderColor: "rgba(0,0,0,0.09)",
899
              borderWidth: "0",
900
              backgroundColor: "rgba(0,0,0,0.07)",
901
              fontFamily: "Poppins"
902
            }
903
          ]
904
        },
905
        options: {
906
          legend: {
907
            position: 'top',
908
            labels: {
909
              fontFamily: 'Poppins'
910
            }
911
 
912
          },
913
          scales: {
914
            xAxes: [{
915
              ticks: {
916
                fontFamily: "Poppins"
917
 
918
              }
919
            }],
920
            yAxes: [{
921
              ticks: {
922
                beginAtZero: true,
923
                fontFamily: "Poppins"
924
              }
925
            }]
926
          }
927
        }
928
      });
929
    }
930
 
931
 
932
  } catch (error) {
933
    console.log(error);
934
  }
935
 
936
  try {
937
 
938
    //radar chart
939
    var ctx = document.getElementById("radarChart");
940
    if (ctx) {
941
      ctx.height = 200;
942
      var myChart = new Chart(ctx, {
943
        type: 'radar',
944
        data: {
945
          labels: [["Eating", "Dinner"], ["Drinking", "Water"], "Sleeping", ["Designing", "Graphics"], "Coding", "Cycling", "Running"],
946
          defaultFontFamily: 'Poppins',
947
          datasets: [
948
            {
949
              label: "My First dataset",
950
              data: [65, 59, 66, 45, 56, 55, 40],
951
              borderColor: "rgba(0, 123, 255, 0.6)",
952
              borderWidth: "1",
953
              backgroundColor: "rgba(0, 123, 255, 0.4)"
954
            },
955
            {
956
              label: "My Second dataset",
957
              data: [28, 12, 40, 19, 63, 27, 87],
958
              borderColor: "rgba(0, 123, 255, 0.7",
959
              borderWidth: "1",
960
              backgroundColor: "rgba(0, 123, 255, 0.5)"
961
            }
962
          ]
963
        },
964
        options: {
965
          legend: {
966
            position: 'top',
967
            labels: {
968
              fontFamily: 'Poppins'
969
            }
970
 
971
          },
972
          scale: {
973
            ticks: {
974
              beginAtZero: true,
975
              fontFamily: "Poppins"
976
            }
977
          }
978
        }
979
      });
980
    }
981
 
982
  } catch (error) {
983
    console.log(error)
984
  }
985
 
986
  try {
987
 
988
    //line chart
989
    var ctx = document.getElementById("lineChart");
990
    if (ctx) {
991
      ctx.height = 150;
992
      var myChart = new Chart(ctx, {
993
        type: 'line',
994
        data: {
995
          labels: ["January", "February", "March", "April", "May", "June", "July"],
996
          defaultFontFamily: "Poppins",
997
          datasets: [
998
            {
999
              label: "My First dataset",
1000
              borderColor: "rgba(0,0,0,.09)",
1001
              borderWidth: "1",
1002
              backgroundColor: "rgba(0,0,0,.07)",
1003
              data: [22, 44, 67, 43, 76, 45, 12]
1004
            },
1005
            {
1006
              label: "My Second dataset",
1007
              borderColor: "rgba(0, 123, 255, 0.9)",
1008
              borderWidth: "1",
1009
              backgroundColor: "rgba(0, 123, 255, 0.5)",
1010
              pointHighlightStroke: "rgba(26,179,148,1)",
1011
              data: [16, 32, 18, 26, 42, 33, 44]
1012
            }
1013
          ]
1014
        },
1015
        options: {
1016
          legend: {
1017
            position: 'top',
1018
            labels: {
1019
              fontFamily: 'Poppins'
1020
            }
1021
 
1022
          },
1023
          responsive: true,
1024
          tooltips: {
1025
            mode: 'index',
1026
            intersect: false
1027
          },
1028
          hover: {
1029
            mode: 'nearest',
1030
            intersect: true
1031
          },
1032
          scales: {
1033
            xAxes: [{
1034
              ticks: {
1035
                fontFamily: "Poppins"
1036
 
1037
              }
1038
            }],
1039
            yAxes: [{
1040
              ticks: {
1041
                beginAtZero: true,
1042
                fontFamily: "Poppins"
1043
              }
1044
            }]
1045
          }
1046
 
1047
        }
1048
      });
1049
    }
1050
 
1051
 
1052
  } catch (error) {
1053
    console.log(error);
1054
  }
1055
 
1056
 
1057
  try {
1058
 
1059
    //doughut chart
1060
    var ctx = document.getElementById("doughutChart");
1061
    if (ctx) {
1062
      ctx.height = 150;
1063
      var myChart = new Chart(ctx, {
1064
        type: 'doughnut',
1065
        data: {
1066
          datasets: [{
1067
            data: [45, 25, 20, 10],
1068
            backgroundColor: [
1069
              "rgba(0, 123, 255,0.9)",
1070
              "rgba(0, 123, 255,0.7)",
1071
              "rgba(0, 123, 255,0.5)",
1072
              "rgba(0,0,0,0.07)"
1073
            ],
1074
            hoverBackgroundColor: [
1075
              "rgba(0, 123, 255,0.9)",
1076
              "rgba(0, 123, 255,0.7)",
1077
              "rgba(0, 123, 255,0.5)",
1078
              "rgba(0,0,0,0.07)"
1079
            ]
1080
 
1081
          }],
1082
          labels: [
1083
            "Green",
1084
            "Green",
1085
            "Green",
1086
            "Green"
1087
          ]
1088
        },
1089
        options: {
1090
          legend: {
1091
            position: 'top',
1092
            labels: {
1093
              fontFamily: 'Poppins'
1094
            }
1095
 
1096
          },
1097
          responsive: true
1098
        }
1099
      });
1100
    }
1101
 
1102
 
1103
  } catch (error) {
1104
    console.log(error);
1105
  }
1106
 
1107
 
1108
  try {
1109
 
1110
    //pie chart
1111
    var ctx = document.getElementById("pieChart");
1112
    if (ctx) {
1113
      ctx.height = 200;
1114
      var myChart = new Chart(ctx, {
1115
        type: 'pie',
1116
        data: {
1117
          datasets: [{
1118
            data: [45, 25, 20, 10],
1119
            backgroundColor: [
1120
              "rgba(0, 123, 255,0.9)",
1121
              "rgba(0, 123, 255,0.7)",
1122
              "rgba(0, 123, 255,0.5)",
1123
              "rgba(0,0,0,0.07)"
1124
            ],
1125
            hoverBackgroundColor: [
1126
              "rgba(0, 123, 255,0.9)",
1127
              "rgba(0, 123, 255,0.7)",
1128
              "rgba(0, 123, 255,0.5)",
1129
              "rgba(0,0,0,0.07)"
1130
            ]
1131
 
1132
          }],
1133
          labels: [
1134
            "Green",
1135
            "Green",
1136
            "Green"
1137
          ]
1138
        },
1139
        options: {
1140
          legend: {
1141
            position: 'top',
1142
            labels: {
1143
              fontFamily: 'Poppins'
1144
            }
1145
 
1146
          },
1147
          responsive: true
1148
        }
1149
      });
1150
    }
1151
 
1152
 
1153
  } catch (error) {
1154
    console.log(error);
1155
  }
1156
 
1157
  try {
1158
 
1159
    // polar chart
1160
    var ctx = document.getElementById("polarChart");
1161
    if (ctx) {
1162
      ctx.height = 200;
1163
      var myChart = new Chart(ctx, {
1164
        type: 'polarArea',
1165
        data: {
1166
          datasets: [{
1167
            data: [15, 18, 9, 6, 19],
1168
            backgroundColor: [
1169
              "rgba(0, 123, 255,0.9)",
1170
              "rgba(0, 123, 255,0.8)",
1171
              "rgba(0, 123, 255,0.7)",
1172
              "rgba(0,0,0,0.2)",
1173
              "rgba(0, 123, 255,0.5)"
1174
            ]
1175
 
1176
          }],
1177
          labels: [
1178
            "Green",
1179
            "Green",
1180
            "Green",
1181
            "Green"
1182
          ]
1183
        },
1184
        options: {
1185
          legend: {
1186
            position: 'top',
1187
            labels: {
1188
              fontFamily: 'Poppins'
1189
            }
1190
 
1191
          },
1192
          responsive: true
1193
        }
1194
      });
1195
    }
1196
 
1197
  } catch (error) {
1198
    console.log(error);
1199
  }
1200
 
1201
  try {
1202
 
1203
    // single bar chart
1204
    var ctx = document.getElementById("singelBarChart");
1205
    if (ctx) {
1206
      ctx.height = 150;
1207
      var myChart = new Chart(ctx, {
1208
        type: 'bar',
1209
        data: {
1210
          labels: ["Sun", "Mon", "Tu", "Wed", "Th", "Fri", "Sat"],
1211
          datasets: [
1212
            {
1213
              label: "My First dataset",
1214
              data: [40, 55, 75, 81, 56, 55, 40],
1215
              borderColor: "rgba(0, 123, 255, 0.9)",
1216
              borderWidth: "0",
1217
              backgroundColor: "rgba(0, 123, 255, 0.5)"
1218
            }
1219
          ]
1220
        },
1221
        options: {
1222
          legend: {
1223
            position: 'top',
1224
            labels: {
1225
              fontFamily: 'Poppins'
1226
            }
1227
 
1228
          },
1229
          scales: {
1230
            xAxes: [{
1231
              ticks: {
1232
                fontFamily: "Poppins"
1233
 
1234
              }
1235
            }],
1236
            yAxes: [{
1237
              ticks: {
1238
                beginAtZero: true,
1239
                fontFamily: "Poppins"
1240
              }
1241
            }]
1242
          }
1243
        }
1244
      });
1245
    }
1246
 
1247
  } catch (error) {
1248
    console.log(error);
1249
  }
1250
 
1251
})(jQuery);
1252
 
1253
 
1254
 
1255
(function ($) {
1256
    // USE STRICT
1257
    "use strict";
1258
    var navbars = ['header', 'aside'];
1259
    var hrefSelector = 'a:not([target="_blank"]):not([href^="#"]):not([class^="chosen-single"])';
1260
    var linkElement = navbars.map(element => element + ' ' + hrefSelector).join(', ');
1261
    $(".animsition").animsition({
1262
      inClass: 'fade-in',
1263
      outClass: 'fade-out',
1264
      inDuration: 900,
1265
      outDuration: 900,
1266
      linkElement: linkElement,
1267
      loading: true,
1268
      loadingParentElement: 'html',
1269
      loadingClass: 'page-loader',
1270
      loadingInner: '<div class="page-loader__spin"></div>',
1271
      timeout: false,
1272
      timeoutCountdown: 5000,
1273
      onLoadEvent: true,
1274
      browser: ['animation-duration', '-webkit-animation-duration'],
1275
      overlay: false,
1276
      overlayClass: 'animsition-overlay-slide',
1277
      overlayParentElement: 'html',
1278
      transition: function (url) {
1279
        window.location.href = url;
1280
      }
1281
    });
1282
 
1283
 
1284
  })(jQuery);
1285
(function ($) {
1286
  // USE STRICT
1287
  "use strict";
1288
 
1289
  // Map
1290
  try {
1291
 
1292
    var vmap = $('#vmap');
1293
    if(vmap[0]) {
1294
      vmap.vectorMap( {
1295
        map: 'world_en',
1296
        backgroundColor: null,
1297
        color: '#ffffff',
1298
        hoverOpacity: 0.7,
1299
        selectedColor: '#1de9b6',
1300
        enableZoom: true,
1301
        showTooltip: true,
1302
        values: sample_data,
1303
        scaleColors: [ '#1de9b6', '#03a9f5'],
1304
        normalizeFunction: 'polynomial'
1305
      });
1306
    }
1307
 
1308
  } catch (error) {
1309
    console.log(error);
1310
  }
1311
 
1312
  // Europe Map
1313
  try {
1314
 
1315
    var vmap1 = $('#vmap1');
1316
    if(vmap1[0]) {
1317
      vmap1.vectorMap( {
1318
        map: 'europe_en',
1319
        color: '#007BFF',
1320
        borderColor: '#fff',
1321
        backgroundColor: '#fff',
1322
        enableZoom: true,
1323
        showTooltip: true
1324
      });
1325
    }
1326
 
1327
  } catch (error) {
1328
    console.log(error);
1329
  }
1330
 
1331
  // USA Map
1332
  try {
1333
 
1334
    var vmap2 = $('#vmap2');
1335
 
1336
    if(vmap2[0]) {
1337
      vmap2.vectorMap( {
1338
        map: 'usa_en',
1339
        color: '#007BFF',
1340
        borderColor: '#fff',
1341
        backgroundColor: '#fff',
1342
        enableZoom: true,
1343
        showTooltip: true,
1344
        selectedColor: null,
1345
        hoverColor: null,
1346
        colors: {
1347
            mo: '#001BFF',
1348
            fl: '#001BFF',
1349
            or: '#001BFF'
1350
        },
1351
        onRegionClick: function ( event, code, region ) {
1352
            event.preventDefault();
1353
        }
1354
      });
1355
    }
1356
 
1357
  } catch (error) {
1358
    console.log(error);
1359
  }
1360
 
1361
  // Germany Map
1362
  try {
1363
 
1364
    var vmap3 = $('#vmap3');
1365
    if(vmap3[0]) {
1366
      vmap3.vectorMap( {
1367
        map: 'germany_en',
1368
        color: '#007BFF',
1369
        borderColor: '#fff',
1370
        backgroundColor: '#fff',
1371
        onRegionClick: function ( element, code, region ) {
1372
            var message = 'You clicked "' + region + '" which has the code: ' + code.toUpperCase();
1373
 
1374
            alert( message );
1375
        }
1376
      });
1377
    }
1378
 
1379
  } catch (error) {
1380
    console.log(error);
1381
  }
1382
 
1383
  // France Map
1384
  try {
1385
 
1386
    var vmap4 = $('#vmap4');
1387
    if(vmap4[0]) {
1388
      vmap4.vectorMap( {
1389
        map: 'france_fr',
1390
        color: '#007BFF',
1391
        borderColor: '#fff',
1392
        backgroundColor: '#fff',
1393
        enableZoom: true,
1394
        showTooltip: true
1395
      });
1396
    }
1397
 
1398
  } catch (error) {
1399
    console.log(error);
1400
  }
1401
 
1402
  // Russia Map
1403
  try {
1404
    var vmap5 = $('#vmap5');
1405
    if(vmap5[0]) {
1406
      vmap5.vectorMap( {
1407
        map: 'russia_en',
1408
        color: '#007BFF',
1409
        borderColor: '#fff',
1410
        backgroundColor: '#fff',
1411
        hoverOpacity: 0.7,
1412
        selectedColor: '#999999',
1413
        enableZoom: true,
1414
        showTooltip: true,
1415
        scaleColors: [ '#C8EEFF', '#006491' ],
1416
        normalizeFunction: 'polynomial'
1417
      });
1418
    }
1419
 
1420
 
1421
  } catch (error) {
1422
    console.log(error);
1423
  }
1424
 
1425
  // Brazil Map
1426
  try {
1427
 
1428
    var vmap6 = $('#vmap6');
1429
    if(vmap6[0]) {
1430
      vmap6.vectorMap( {
1431
        map: 'brazil_br',
1432
        color: '#007BFF',
1433
        borderColor: '#fff',
1434
        backgroundColor: '#fff',
1435
        onRegionClick: function ( element, code, region ) {
1436
            var message = 'You clicked "' + region + '" which has the code: ' + code.toUpperCase();
1437
            alert( message );
1438
        }
1439
      });
1440
    }
1441
 
1442
  } catch (error) {
1443
    console.log(error);
1444
  }
1445
})(jQuery);
1446
(function ($) {
1447
  // Use Strict
1448
  "use strict";
1449
  try {
1450
    var progressbarSimple = $('.js-progressbar-simple');
1451
    progressbarSimple.each(function () {
1452
      var that = $(this);
1453
      var executed = false;
1454
      $(window).on('load', function () {
1455
 
1456
        that.waypoint(function () {
1457
          if (!executed) {
1458
            executed = true;
1459
            /*progress bar*/
1460
            that.progressbar({
1461
              update: function (current_percentage, $this) {
1462
                $this.find('.js-value').html(current_percentage + '%');
1463
              }
1464
            });
1465
          }
1466
        }, {
1467
            offset: 'bottom-in-view'
1468
          });
1469
 
1470
      });
1471
    });
1472
  } catch (err) {
1473
    console.log(err);
1474
  }
1475
})(jQuery);
1476
(function ($) {
1477
  // USE STRICT
1478
  "use strict";
1479
 
1480
  // Scroll Bar
1481
  try {
1482
    var jscr1 = $('.js-scrollbar1');
1483
    if(jscr1[0]) {
1484
      const ps1 = new PerfectScrollbar('.js-scrollbar1');
1485
    }
1486
 
1487
    var jscr2 = $('.js-scrollbar2');
1488
    if (jscr2[0]) {
1489
      const ps2 = new PerfectScrollbar('.js-scrollbar2');
1490
 
1491
    }
1492
 
1493
  } catch (error) {
1494
    console.log(error);
1495
  }
1496
 
1497
})(jQuery);
1498
(function ($) {
1499
  // USE STRICT
1500
  "use strict";
1501
 
1502
  // Select 2
1503
  try {
1504
 
1505
    $(".js-select2").each(function () {
1506
      $(this).select2({
1507
        minimumResultsForSearch: 20,
1508
        dropdownParent: $(this).next('.dropDownSelect2')
1509
      });
1510
    });
1511
 
1512
  } catch (error) {
1513
    console.log(error);
1514
  }
1515
 
1516
 
1517
})(jQuery);
1518
(function ($) {
1519
  // USE STRICT
1520
  "use strict";
1521
 
1522
  // Dropdown
1523
  try {
1524
    var menu = $('.js-item-menu');
1525
    var sub_menu_is_showed = -1;
1526
 
1527
    for (var i = 0; i < menu.length; i++) {
1528
      $(menu[i]).on('click', function (e) {
1529
        e.preventDefault();
1530
        $('.js-right-sidebar').removeClass("show-sidebar");
1531
        if (jQuery.inArray(this, menu) == sub_menu_is_showed) {
1532
          $(this).toggleClass('show-dropdown');
1533
          sub_menu_is_showed = -1;
1534
        }
1535
        else {
1536
          for (var i = 0; i < menu.length; i++) {
1537
            $(menu[i]).removeClass("show-dropdown");
1538
          }
1539
          $(this).toggleClass('show-dropdown');
1540
          sub_menu_is_showed = jQuery.inArray(this, menu);
1541
        }
1542
      });
1543
    }
1544
    $(".js-item-menu, .js-dropdown").click(function (event) {
1545
      event.stopPropagation();
1546
    });
1547
 
1548
    $("body,html").on("click", function () {
1549
      for (var i = 0; i < menu.length; i++) {
1550
        menu[i].classList.remove("show-dropdown");
1551
      }
1552
      sub_menu_is_showed = -1;
1553
    });
1554
 
1555
  } catch (error) {
1556
    console.log(error);
1557
  }
1558
 
1559
  var wW = $(window).width();
1560
    // Right Sidebar
1561
    var right_sidebar = $('.js-right-sidebar');
1562
    var sidebar_btn = $('.js-sidebar-btn');
1563
 
1564
    sidebar_btn.on('click', function (e) {
1565
      e.preventDefault();
1566
      for (var i = 0; i < menu.length; i++) {
1567
        menu[i].classList.remove("show-dropdown");
1568
      }
1569
      sub_menu_is_showed = -1;
1570
      right_sidebar.toggleClass("show-sidebar");
1571
    });
1572
 
1573
    $(".js-right-sidebar, .js-sidebar-btn").click(function (event) {
1574
      event.stopPropagation();
1575
    });
1576
 
1577
    $("body,html").on("click", function () {
1578
      right_sidebar.removeClass("show-sidebar");
1579
 
1580
    });
1581
 
1582
 
1583
  // Sublist Sidebar
1584
  try {
1585
    var arrow = $('.js-arrow');
1586
    arrow.each(function () {
1587
      var that = $(this);
1588
      that.on('click', function (e) {
1589
        e.preventDefault();
1590
        that.find(".arrow").toggleClass("up");
1591
        that.toggleClass("open");
1592
        that.parent().find('.js-sub-list').slideToggle("250");
1593
      });
1594
    });
1595
 
1596
  } catch (error) {
1597
    console.log(error);
1598
  }
1599
 
1600
 
1601
  try {
1602
    // Hamburger Menu
1603
    $('.hamburger').on('click', function () {
1604
      $(this).toggleClass('is-active');
1605
      $('.navbar-mobile').slideToggle('500');
1606
    });
1607
    $('.navbar-mobile__list li.has-dropdown > a').on('click', function () {
1608
      var dropdown = $(this).siblings('ul.navbar-mobile__dropdown');
1609
      $(this).toggleClass('active');
1610
      $(dropdown).slideToggle('500');
1611
      return false;
1612
    });
1613
  } catch (error) {
1614
    console.log(error);
1615
  }
1616
})(jQuery);
1617
(function ($) {
1618
  // USE STRICT
1619
  "use strict";
1620
 
1621
  // Load more
1622
  try {
1623
    var list_load = $('.js-list-load');
1624
    if (list_load[0]) {
1625
      list_load.each(function () {
1626
        var that = $(this);
1627
        that.find('.js-load-item').hide();
1628
        var load_btn = that.find('.js-load-btn');
1629
        load_btn.on('click', function (e) {
1630
          $(this).text("Loading...").delay(1500).queue(function (next) {
1631
            $(this).hide();
1632
            that.find(".js-load-item").fadeToggle("slow", 'swing');
1633
          });
1634
          e.preventDefault();
1635
        });
1636
      })
1637
 
1638
    }
1639
  } catch (error) {
1640
    console.log(error);
1641
  }
1642
 
1643
})(jQuery);
1644
(function ($) {
1645
  // USE STRICT
1646
  "use strict";
1647
 
1648
  try {
1649
 
1650
    $('[data-toggle="tooltip"]').tooltip();
1651
 
1652
  } catch (error) {
1653
    console.log(error);
1654
  }
1655
 
1656
  // Chatbox
1657
  try {
1658
    var inbox_wrap = $('.js-inbox');
1659
    var message = $('.au-message__item');
1660
    message.each(function(){
1661
      var that = $(this);
1662
 
1663
      that.on('click', function(){
1664
        $(this).parent().parent().parent().toggleClass('show-chat-box');
1665
      });
1666
    });
1667
 
1668
 
1669
  } catch (error) {
1670
    console.log(error);
1671
  }
1672
 
1673
})(jQuery);