source: public/assets/js/examples/charts/peity.js@ e78295c

Last change on this file since e78295c was 194a359, checked in by beratkjufliju <kufliju@…>, 3 years ago

added departments, edited users and added user settings

  • Property mode set to 100644
File size: 4.0 KB
Line 
1'use strict';
2$(document).ready(function () {
3
4 var colors = {
5 primary: $('.colors .bg-primary').css('background-color'),
6 primaryLight: $('.colors .bg-primary-bright').css('background-color'),
7 secondary: $('.colors .bg-secondary').css('background-color'),
8 secondaryLight: $('.colors .bg-secondary-bright').css('background-color'),
9 info: $('.colors .bg-info').css('background-color'),
10 infoLight: $('.colors .bg-info-bright').css('background-color'),
11 success: $('.colors .bg-success').css('background-color'),
12 successLight: $('.colors .bg-success-bright').css('background-color'),
13 danger: $('.colors .bg-danger').css('background-color'),
14 dangerLight: $('.colors .bg-danger-bright').css('background-color'),
15 warning: $('.colors .bg-warning').css('background-color'),
16 warningLight: $('.colors .bg-warning-bright').css('background-color'),
17 };
18
19 $("span.pie").peity("pie");
20
21 $(".pie-1").peity("pie", {
22 "fill": [colors.primary, colors.primaryLight],
23 "radius": 30
24 });
25
26 $(".pie-2").peity("pie", {
27 "fill": [colors.secondary, colors.secondaryLight],
28 "radius": 30
29 });
30
31 $(".pie-3").peity("pie", {
32 "fill": [colors.success, colors.successLight],
33 "radius": 30
34 });
35
36 $(".pie-4").peity("pie", {
37 "fill": [colors.danger, colors.dangerLight],
38 "radius": 30
39 });
40
41 $(".pie-5").peity("pie", {
42 "fill": [colors.warning, colors.warningLight],
43 "radius": 30
44 });
45
46 $(".pie-6").peity("pie", {
47 "fill": [colors.primary, colors.primaryLight],
48 "radius": 30,
49 "innerRadius": 20
50 });
51
52 $(".pie-7").peity("pie", {
53 "fill": [colors.secondary, colors.secondaryLight],
54 "radius": 30,
55 "innerRadius": 20
56 });
57
58 $(".pie-8").peity("pie", {
59 "fill": [colors.success, colors.successLight],
60 "radius": 30,
61 "innerRadius": 20
62 });
63
64 $(".pie-9").peity("pie", {
65 "fill": [colors.danger, colors.dangerLight],
66 "radius": 30,
67 "innerRadius": 20
68 });
69
70 $(".pie-10").peity("pie", {
71 "fill": [colors.warning, colors.warningLight],
72 "radius": 30,
73 "innerRadius": 20
74 });
75
76 $(".line-1").peity("line", {
77 "fill": colors.primaryLight,
78 "stroke": colors.primary,
79 "height": 80,
80 "width": 100
81 });
82
83 $(".line-2").peity("line", {
84 "fill": colors.secondaryLight,
85 "stroke": colors.secondary,
86 "height": 80,
87 "width": 100
88 });
89
90 $(".line-3").peity("line", {
91 "fill": colors.secondaryLight,
92 "stroke": colors.success,
93 "height": 80,
94 "width": 100
95 });
96
97 $(".line-4").peity("line", {
98 "fill": colors.dangerLight,
99 "stroke": colors.danger,
100 "height": 80,
101 "width": 100
102 });
103
104 $(".line-5").peity("line", {
105 "fill": colors.warningLight,
106 "stroke": colors.warning,
107 "height": 80,
108 "width": 100
109 });
110
111 $(".bar-1").peity("bar", {
112 "fill": [colors.primary, colors.primaryLight],
113 "height": 50,
114 "width": 100
115 });
116
117 $(".bar-2").peity("bar", {
118 "fill": [colors.secondary, colors.secondaryLight],
119 "height": 50,
120 "width": 100
121 });
122
123 $(".bar-3").peity("bar", {
124 "fill": [colors.success, colors.successLight],
125 "height": 50,
126 "width": 100
127 });
128
129 $(".bar-4").peity("bar", {
130 "fill": [colors.danger, colors.dangerLight],
131 "height": 50,
132 "width": 100
133 });
134
135 $(".bar-5").peity("bar", {
136 "fill": [colors.warning, colors.warningLight],
137 "height": 50,
138 "width": 100
139 });
140
141 $('.peity [data-title]').mousemove(function (e) {
142 $('#peity-tooltip').html($(this).data('title')).css({left: e.pageX + 8, top: e.pageY + 8});
143 }).hover(
144 function () {
145 $('#peity-tooltip').addClass('show');
146 }, function () {
147 $('#peity-tooltip').removeClass('show');
148 }
149 );
150
151});
Note: See TracBrowser for help on using the repository browser.