1import{B as d}from"./ui-CicS3nIv.js";import{B as l}from"./index-CIGyjiPK.js";import"./preload-helper-C1FmrZbK.js";import"./_commonjsHelpers-C4iS2aBk.js";class y extends d{constructor(){super()}init(t){this.el=t,this.elementId=this.el.getAttribute("id"),this.gradientId=`${this.elementId}-gradient`;const{profit:r,profitlabel:s,risk:i,risklabel:a}=this.el.dataset;return this.data={labels:[a,s],series:[[i,r]]},this.chart=new l(this.el,this.data,{seriesBarDistance:10,height:"160px",divisor:1,high:6,reverseData:!0,gradientId:this.gradientId,horizontalBars:!0,axisX:{onlyInteger:!0},axisY:{offset:120}}),this.chart.on("draw",function(e){e.type==="bar"&&(e.element.attr({y1:e.y1+.001}),e.element.animate({x2:{dur:"0.5s",from:e.x1,to:e.x2}}))}),this.chart.on("created",function(e){var o=e.svg.elem("defs");o.elem("linearGradient",{id:e.options.gradientId,y1:0,x1:1,y2:0,x2:0}).elem("stop",{offset:0,"stop-color":"#666"}).parent().elem("stop",{offset:1,"stop-color":"#ccc"}),e.svg._node.querySelectorAll(".ct-series.ct-series-a line").forEach(n=>{n.style.stroke="url(#"+e.options.gradientId+")"})}),this.on("updateChart",e=>{this.chart.update()}),this}}export{y as default}; 2//# sourceMappingURL=BarChartHorizontal-DoGZ9osw.js.map
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.