PageSourceSearch

https://www.brottsoffermyndigheten.se/Dist/brom/vue-barChart.263c5d657476f2f05e26.js

js brottsoffermyndigheten.se collected 2026-10-02 04:26:10 UTC 1,935 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkbrom_web=globalThis.webpackChunkbrom_web||[]).push([[6815],{9127:(a,e,t)=>{t.r(e),t.d(e,{default:()=>o});var s=t(8257),l=t(7154),n=t(8282),c=t(7786),r=t(8405);const o={__name:"_bar-chart",props:{stacked:{type:Boolean,default:!1},percentage:{type:Boolean,default:!1},aspectRatio:{type:Number,default:.75},horizontal:{type:Boolean,default:!1},data:{type:Object,default:()=>({labels:[],datasets:[],label:""})}},setup(a){const e=(0,s.KR)(null),t=(0,s.KR)(null),o=(0,s.KR)(!1),d=a;return(0,s.KC)((()=>{const a=d.percentage?(a=>{const e=[...a],t=e[0].data.length,s=new Array(t).fill(0);for(let a=0;a<t;a++)e.forEach((e=>{s[a]+=e.data[a]}));return e.forEach((a=>{a.data.forEach(((e,t)=>{a.data[t]=((a,e)=>a/e*100)(e,s[t])}))})),e})(d.data.datasets):d.data.datasets,s={labels:d.data.labels,label:d.data.label,datasets:a??[]};s.datasets.forEach(((a,e)=>{s.datasets[e].backgroundColor=n.H[e]}));const u={type:"bar",data:s,options:{}},i={weight:[10,20],indexAxis:d.horizontal?"y":"x",scales:{x:{stacked:d.stacked,suggestedMax:d.percentage?100:d.stacked?(0,r.I)(s):(0,r.T)(s),suggestedMin:5},y:{beginAtZero:!0,suggestedMax:d.percentage?100:d.stacked?(0,r.I)(s):(0,r.T)(s),suggestedMin:5,stacked:d.stacked}},plugins:{},responsive:!0};d.percentage&&(i.plugins.tooltip={callbacks:{label:a=>`${a.dataset.label} : ${Math.round(a.raw)}%`}},d.horizontal?i.scales.x.ticks={min:0,max:100,callback:function(a){return a+"%"}}:i.scales.y.ticks={min:0,max:100,callback:function(a){return a+"%"}});const{stop:p}=(0,c.BLq)(t,(([{isIntersecting:a}])=>{if(!a||o.value)return;const s=t.value.offsetWidth;e.value.width=s,e.value.height=s*d.aspectRatio;const n=e.value;setTimeout((()=>{new l.Ay(n,{type:u.type,data:u.data,options:i}),o.value=!0}),1e3),p()}))})),(a,l)=>((0,s.uX)(),(0,s.CE)("div",{ref_key:"target",ref:t},[(0,s.Lk)("canvas",{ref_key:"chart",ref:e,class:"bar-chart",width:"530",height:"300"},null,512)],512))}}}}]);

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.