PageSourceSearch

https://www.friedensroute.de/typo3conf/ext/skeleton/Resources/Public/Js/Default/19_jquery.pie.js?1707145171

js friedensroute.de collected 2026-10-02 18:01:09 UTC 2,117 bytes, 90 lines download raw bytes

1/*!
2 Adjustable Pie Chart
3 https://codepen.io/ejsado/pen/cLrlm
4 */
5
6(function($) {
7	$.fn.pie = function(options) {
8		var pies = [],
9			_options = options;
10
11		var init = function($this) {
12			pies = [];
13
14			$this.each(function(i, pie) {
15				var listTotal = 0,
16					offset = 0,
17					color = [
18						"bg--pie-1",
19						"bg--pie-2",
20						"bg--pie-3",
21						"bg--pie-4",
22						"bg--pie-5",
23						"bg--pie-6",
24						"bg--pie-7",
25						"bg--pie-8",
26					];
27
28				pies.push({
29					id: i,
30					listData: []
31				});
32
33				$(pie).find('.js-pie-legend li').each(function(l) {
34					var $item = $(this),
35						num = Number($(this).data('pieNumber'));
36
37					pies[i].listData.push(num);
38
39					listTotal += num;
40
41					$item.prepend('<span class="pie__lengend-rect '+color[l]+'"/>');
42				});
43
44				for(var z = 0; z < pies[i].listData.length; z++) {
45					var size = sliceSize(pies[i].listData[z], listTotal);
46					iterateSlices(size, pie, offset, z, pies[i].id, color[z]);
47					offset += size;
48				}
49			});
50		}
51
52		var sliceSize = function(dataNum, dataTotal) {
53			return dataNum / dataTotal * 360;
54		}
55
56		var addSlice = function(sliceSize, pieElem, offset, sliceID, color) {
57			var offset = offset - 1,
58				sizeRotation = -179 + sliceSize,
59				$pie = $(pieElem);
60
61			$pie.find('.js-pie-chart').append('<div class="pie__slice ' + sliceID + '"><span class="pie__slice-bg"></span></div>');
62
63			$pie.find('.' + sliceID).css({
64				transform: 'rotate(' + offset + 'deg) translate3d(0,0,0)'
65			});
66
67			$pie.find('.' + sliceID + ' .pie__slice-bg').css({
68				transform: 'rotate(' + sizeRotation + 'deg) translate3d(0,0,0)'
69			}).addClass(color);
70		}
71
72		var iterateSlices = function(sliceSize, pieElem, offset, dataCount, sliceCount, color) {
73			var sliceID = 's' + dataCount + '-' + sliceCount;
74			var maxSize = 179;
75
76			if(sliceSize <= maxSize) {
77				addSlice(sliceSize, pieElem, offset, sliceID, color);
78			} else {
79				addSlice(maxSize, pieElem, offset, sliceID, color);
80				iterateSlices(sliceSize - maxSize, pieElem, offset + maxSize, dataCount, sliceCount + 1, color);
81			}
82		}
83
84		// initialize
85		init(this);
86
87		return this;
88	};
89
90}(jQuery));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.