PageSourceSearch

https://questdb.com/_next/static/chunks/5928.63d8f2046aa5cbda.js

js questdb.com collected 2026-09-24 19:02:58 UTC 3,732 bytes, 29 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5928],{65928:(e,t,a)=>{a.d(t,{diagram:()=>k});var i=a(66404),l=a(46590),r=a(81767),s=a(9053),n=a(34290),o=a(85095),c=s.UI.pie,p={sections:new Map,showData:!1,config:c},d=p.sections,g=p.showData,u=structuredClone(c),f=(0,s.K2)(()=>structuredClone(u),"getConfig"),h=(0,s.K2)(()=>{d=new Map,g=p.showData,(0,s.IU)()},"clear"),m=(0,s.K2)(({label:e,value:t})=>{d.has(e)||(d.set(e,t),s.Rm.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),x=(0,s.K2)(()=>d,"getSections"),S=(0,s.K2)(e=>{g=e},"setShowData"),w=(0,s.K2)(()=>g,"getShowData"),D={getConfig:f,clear:h,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setAccTitle:s.SV,getAccTitle:s.iN,setAccDescription:s.EI,getAccDescription:s.m7,addSection:m,getSections:x,setShowData:S,getShowData:w},T=(0,s.K2)((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),$={parse:(0,s.K2)(async e=>{let t=await (0,n.qg)("pie",e);s.Rm.debug(t),T(t,D)},"parse")},y=(0,s.K2)(e=>`
2  .pieCircle{
3    stroke: ${e.pieStrokeColor};
4    stroke-width : ${e.pieStrokeWidth};
5    opacity : ${e.pieOpacity};
6  }
7  .pieOuterCircle{
8    stroke: ${e.pieOuterStrokeColor};
9    stroke-width: ${e.pieOuterStrokeWidth};
10    fill: none;
11  }
12  .pieTitleText {
13    text-anchor: middle;
14    font-size: ${e.pieTitleTextSize};
15    fill: ${e.pieTitleTextColor};
16    font-family: ${e.fontFamily};
17  }
18  .slice {
19    font-family: ${e.fontFamily};
20    fill: ${e.pieSectionTextColor};
21    font-size:${e.pieSectionTextSize};
22    // fill: white;
23  }
24  .legend text {
25    fill: ${e.pieLegendTextColor};
26    font-family: ${e.fontFamily};
27    font-size: ${e.pieLegendTextSize};
28  }
29`,"getStyles"),C=(0,s.K2)(e=>{let t=[...e.entries()].map(e=>({label:e[0],value:e[1]})).sort((e,t)=>t.value-e.value);return(0,o.rLf)().value(e=>e.value)(t)},"createPieArcs"),k={parser:$,db:D,renderer:{draw:(0,s.K2)((e,t,a,i)=>{s.Rm.debug("rendering pie chart\n"+e);let n=i.db,c=(0,s.D7)(),p=(0,l.$t)(n.getConfig(),c.pie),d=(0,r.D)(t),g=d.append("g");g.attr("transform","translate(225,225)");let{themeVariables:u}=c,[f]=(0,l.I5)(u.pieOuterStrokeWidth);f??=2;let h=p.textPosition,m=(0,o.JLW)().innerRadius(0).outerRadius(185),x=(0,o.JLW)().innerRadius(185*h).outerRadius(185*h);g.append("circle").attr("cx",0).attr("cy",0).attr("r",185+f/2).attr("class","pieOuterCircle");let S=n.getSections(),w=C(S),D=[u.pie1,u.pie2,u.pie3,u.pie4,u.pie5,u.pie6,u.pie7,u.pie8,u.pie9,u.pie10,u.pie11,u.pie12],T=(0,o.UMr)(D);g.selectAll("mySlices").data(w).enter().append("path").attr("d",m).attr("fill",e=>T(e.data.label)).attr("class","pieCircle");let $=0;S.forEach(e=>{$+=e}),g.selectAll("mySlices").data(w).enter().append("text").text(e=>(e.data.value/$*100).toFixed(0)+"%").attr("transform",e=>"translate("+x.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),g.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");let y=g.selectAll(".legend").data(T.domain()).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*T.domain().length/2)+")");y.append("rect").attr("width",18).attr("height",18).style("fill",T).style("stroke",T),y.data(w).append("text").attr("x",22).attr("y",14).text(e=>{let{label:t,value:a}=e.data;return n.getShowData()?`${t} [${a}]`:t});let k=512+Math.max(...y.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0));d.attr("viewBox",`0 0 ${k} 450`),(0,s.a$)(d,450,k,p.useMaxWidth)},"draw")},styles:y}},66404:(e,t,a)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(9053).K2)(i,"populateCommonDb")}}]);

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.