1jQuery(window).on("elementor/frontend/init", function () { 2 elementorFrontend.hooks.addAction( 3 "frontend/element_ready/rkit-pie-chart.default", 4 function ($scope, $) { 5 var ctx = $scope.find("#pieChart")[0].getContext("2d"); 6 var labels = $scope.find("#pieChart").data("label"); 7 var datasets = $scope.find("#pieChart").data("datasets"); 8 var legend = $scope.find("#pieChart").data("legend"); 9 var type = $scope.find("#pieChart").data("type"); 10 11 var data = { 12 labels: labels, 13 datasets: [datasets], 14 }; 15 16 var options = { 17 responsive: false, 18 maintainAspectRatio: true, 19 plugins: { 20 legend: legend, 21 }, 22 }; 23 24 var myChart = new Chart(ctx, { 25 type: type, 26 data: data, 27 options: options, 28 }); 29 30 myChart.resize(); 31 // Observe element resize 32 const resizeObserver = new ResizeObserver(() => { 33 myChart.resize(); 34 }); 35 36 resizeObserver.observe($scope[0]); 37 }, 38 ); 39});
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.