1import{C as e,A as h,i as u,p as C,f as g,c as f}from"./chart-CxJpUjda.js";import{t as b}from"./try-parse-json-PNnY1j55.js";import{a as m,g as P}from"./theme-settings-C6A0L8ST.js";const w=o=>{const a=o.querySelector(".js-pie-chart-canvas"),s=b(o.dataset.chartModel);if(!a)return console.error("No canvas found for",o);if(!s)return console.error("No chart props found for",o);const{chartElements:n,hideLegend:i,showTooltip:l}=s;e.register(h,u,C,g,f);const{labels:p,data:d,backgroundColor:c}=n.reduce((r,t)=>(r.labels.push(t.label),r.data.push(t.data),r.backgroundColor.push(m(t)),r),{labels:[],data:[],backgroundColor:[]});new e(a,{type:"pie",options:{maintainAspectRatio:!1,color:P(o),plugins:{legend:{position:"bottom",display:!i},tooltip:{enabled:l,mode:"point"}}},data:{labels:p,datasets:[{data:d,backgroundColor:c}]}})};export{w as PieChart};
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.