PageSourceSearch

https://0x.kz/build/assets/PieChart-CA91eHz9.js

js 0x.kz collected 2026-10-09 04:37:20 UTC 1,304 bytes, 1 lines download raw bytes

1import{a as p}from"./index-CsDG7sQh.js";import{C as i,p as c,a as l,b as h,A as d}from"./chart-4zv7KpEq.js";import{_ as u,B as m,o as f,g as C}from"./app-DVhk9hEg.js";/* empty css            */i.register(c,l,h,d);const _={name:"PieChart",components:{Pie:p},props:{data:{type:Object,required:!0}},data(){return{chartData:{labels:[],datasets:[]},chartOptions:{responsive:!0,plugins:{legend:{display:!0,position:"top"},title:{display:!0,text:"Pie Chart"}}}}},watch:{data:{deep:!0,handler(){this.prepareChartData(),this.updateChart()}}},mounted(){this.prepareChartData()},methods:{prepareChartData(){const t=[...new Set(this.data.data.map(a=>Object.values(a)[2]))],r=t.map(a=>this.data.data.filter(e=>Object.values(e)[2]===a).reduce((e,s)=>e+(Object.values(s)[1]||0),0));this.chartData={labels:t,datasets:[{data:r,backgroundColor:t.map(()=>this.getRandomColor())}]}},updateChart(){var t;(t=this.$refs.chartRef)!=null&&t.chartInstance&&this.$refs.chartRef.chartInstance.update()},getRandomColor(){const t="0123456789ABCDEF";let r="#";for(let a=0;a<6;a++)r+=t[Math.floor(Math.random()*16)];return r}}};function g(t,r,a,o,e,s){const n=m("Pie");return f(),C(n,{id:"my-pie-chart",options:e.chartOptions,data:e.chartData,ref:"chartRef"},null,8,["options","data"])}const v=u(_,[["render",g]]);export{v as default};

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.