PluginProbe ʕ •ᴥ•ʔ
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF / 2.0.6
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF v2.0.6
2.0.6 2.0.5 trunk 1.3.7 1.4.0 1.4.1 1.4.2 1.4.6 1.5.0 1.5.3 1.5.6 1.5.8 1.6.5 1.6.6 1.6.9 1.7.0 1.7.4 1.8.1 1.8.2 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
robin-image-optimizer / admin / assets / js / statistic.js
robin-image-optimizer / admin / assets / js Last commit date
Chart.min.js 7 months ago bulk-conversion.js 7 months ago bulk-optimization.js 7 months ago calculate-attachments.js 1 year ago index.php 3 years ago meta-migrations.js 3 years ago modals.js 7 months ago notices.js 3 months ago restore-backup.js 7 months ago settings-premium.js 7 months ago single-optimization.js 7 months ago statistic.js 7 months ago sweetalert2.js 3 years ago wrio-license-manager.js 7 months ago
statistic.js
114 lines
1 jQuery(function ($) {
2
3 var chart_html_id = 'wio-main-chart';
4 var webp_chart_html_id = 'wio-webp-chart';
5 var avif_chart_html_id = 'wio-avif-chart';
6
7 var ctx = document.getElementById(chart_html_id);
8 var ctx_webp = document.getElementById(webp_chart_html_id);
9 var ctx_avif = document.getElementById(avif_chart_html_id);
10
11 window.wio_chart = new window.robin.Chart(ctx, {
12 type: 'doughnut',
13 data: {
14 datasets: [
15 {
16 data: [
17 $('#' + chart_html_id).attr('data-errors'),
18 $('#' + chart_html_id).attr('data-optimized'),
19 $('#' + chart_html_id).attr('data-unoptimized'),
20 ],
21 backgroundColor: [
22 '#f1b1b6',
23 '#8bc34a',
24 '#d6d6d6',
25 ],
26 borderWidth: 0,
27 label: 'Dataset 1'
28 }
29 ]
30 },
31 options: {
32 legend: {
33 display: false
34 },
35 events: [],
36 animation: {
37 easing: 'easeOutBounce'
38 },
39 responsive: false,
40 cutoutPercentage: 80
41 }
42 });
43
44 if (ctx_webp) {
45 window.wio_chart_webp = new window.robin.Chart(ctx_webp, {
46 type: 'doughnut',
47 data: {
48 datasets: [
49 {
50 data: [
51 $('#' + webp_chart_html_id).attr('data-errors'),
52 $('#' + webp_chart_html_id).attr('data-optimized'),
53 $('#' + webp_chart_html_id).attr('data-unoptimized'),
54 ],
55 backgroundColor: [
56 '#f1b1b6',
57 '#8bc34a',
58 '#d6d6d6',
59 ],
60 borderWidth: 0,
61 label: 'Dataset 1'
62 }
63 ]
64 },
65 options: {
66 legend: {
67 display: false
68 },
69 events: [],
70 animation: {
71 easing: 'easeOutBounce'
72 },
73 responsive: false,
74 cutoutPercentage: 80
75 }
76 });
77 }
78
79 if (ctx_avif) {
80 window.wio_chart_avif = new window.robin.Chart(ctx_avif, {
81 type: 'doughnut',
82 data: {
83 datasets: [
84 {
85 data: [
86 $('#' + avif_chart_html_id).attr('data-errors'),
87 $('#' + avif_chart_html_id).attr('data-optimized'),
88 $('#' + avif_chart_html_id).attr('data-unoptimized'),
89 ],
90 backgroundColor: [
91 '#f1b1b6',
92 '#8bc34a',
93 '#d6d6d6',
94 ],
95 borderWidth: 0,
96 label: 'Dataset 1'
97 }
98 ]
99 },
100 options: {
101 legend: {
102 display: false
103 },
104 events: [],
105 animation: {
106 easing: 'easeOutBounce'
107 },
108 responsive: false,
109 cutoutPercentage: 80
110 }
111 });
112 }
113 });
114