"use strict";(self.webpackChunkfirebird=self.webpackChunkfirebird||[]).push([[6719],{6719:(A,M,s)=>{s.r(M),s.d(M,{TScatterPainter:()=>u});var g=s(467),_=s(6998),p=s(6823),P=s(5284),c=s(4693),D=s(3277),E=s(4571);class u extends c.TGraphPainter{constructor(e,t){super(e,t),this._is_scatter=!0,this._not_adjust_hrange=!0}getGraph(){return this.getObject()?.fGraph}getHistRangeMargin(){return this.getObject()?.fMargin??.1}drawAxisHisto(){var e=this;return(0,g.A)(function*(){const t=!e.getHistogram(),o=e.createHistogram(t,t);return E.AJ.draw(e.getDrawDom(),o,e.options.Axis+";IGNORE_PALETTE")})()}getPalette(){const e=this.getGraph();let t=e?.fFunctions?.arr?.find(o=>o._typename===_.clTPaletteAxis);if(!t&&e){t=(0,_.create)(_.clTPaletteAxis);const o=this.get_main();Object.assign(t,{fX1NDC:o.fX2NDC+.005,fX2NDC:o.fX2NDC+.05,fY1NDC:o.fY1NDC,fY2NDC:o.fY2NDC,fInit:1,$can_move:!0}),Object.assign(t.fAxis,{fChopt:"+",fLineColor:1,fLineSyle:1,fLineWidth:1,fTextAngle:0,fTextAlign:11,fNdiv:510}),e.fFunctions.AddFirst(t,"")}return t}_updateMembers(e,t){return e.fBits=t.fBits,e.fTitle=t.fTitle,e.fNpoints=t.fNpoints,e.fColor=t.fColor,e.fSize=t.fSize,e.fMargin=t.fMargin,e.fMinMarkerSize=t.fMinMarkerSize,e.fMaxMarkerSize=t.fMaxMarkerSize,super._updateMembers(e.fGraph,t.fGraph)}getZaxis(){return this.getHistogram()?.fZaxis}canZoomInside(e,t,o){if("z"!==e)return super.canZoomInside(e,t,o);const r=this.fContour?.getLevels();if(!r)return!1;for(let f=0;f<r.length-1;++f)if(t<=r[f]&&o>=r[f+1])return!0;return!1}drawGraph(){var e=this;return(0,g.A)(function*(){const t=e.get_main(),o=e.getMainPainter(),r=e.getObject(),f=e.getHistogram();let h=1,C=0;if(!t||!o||!r)return;if(r.fColor){const i=e.getPalette();i&&(i.$main_painter=e);const a=e.getPadPainter();!e._color_palette&&(0,_.isFunc)(a?.getCustomPalette)&&(e._color_palette=a.getCustomPalette()),e._color_palette||(e._color_palette=(0,p.jh)(e.options.Palette,a?.isGrayscale()));let n=r.fColor[0],l=r.fColor[0];for(let m=1;m<r.fColor.length;++m)n=Math.min(n,r.fColor[m]),l=Math.max(l,r.fColor[m]);l<=n?l=n<0?.9*n:n>0?1.1*n:1:n>0&&n<.3*l&&(n=0),e.fContour=new D.Z8(n,l),e.fContour.createNormal(30),e.fContour.configIndicies(0,0),t.zmin=n,t.zmax=l,!t.zoomChangedInteractive("z")&&f&&f.fMinimum!==_.kNoZoom&&f.fMaximum!==_.kNoZoom&&(t.zoom_zmin=f.fMinimum,t.zoom_zmax=f.fMaximum)}if(r.fSize){let i=r.fSize[0],a=r.fSize[0];for(let n=1;n<r.fSize.length;++n)i=Math.min(i,r.fSize[n]),a=Math.max(a,r.fSize[n]);a<=i&&(a=i<0?.9*i:i>0?1.1*i:1),h=(r.fMaxMarkerSize-r.fMinMarkerSize)/(a-i),C=i}e.createG(!t.pad_layer);const z=t.getGrFuncs(),x=t.zoom_zmin!==t.zoom_zmax&&r.fColor;for(let i=0;i<e.bins.length;++i){if(x&&(r.fColor[i]<t.zoom_zmin||r.fColor[i]>t.zoom_zmax))continue;const a=e.bins[i],n=z.grx(a.x),l=z.gry(a.y),m=r.fSize?r.fMinMarkerSize+h*(r.fSize[i]-C):r.fMarkerSize,T=r.fColor?e.fContour.getPaletteColor(e._color_palette,r.fColor[i]):e.getColor(r.fMarkerColor),d=new P.e({color:T,size:m,style:r.fMarkerStyle});e.draw_g.append("svg:path").attr("d",d.create(n,l)).call(d.func)}return e})()}static draw(e,t,o){return(0,g.A)(function*(){return c.TGraphPainter._drawGraph(new u(e,t),o)})()}}}}]);