/** * Highcharts JS v11.2.0 (2023-10-30) * * Series on point module * * (c) 2010-2022 Highsoft AS * Author: Rafal Sebestjanski and Piotr Madej * * License: www.highcharts.com/license */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/modules/series-on-point",["highcharts"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(t,e,i,o){t.hasOwnProperty(e)||(t[e]=o.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/SeriesOnPointComposition.js",[e["Core/Series/Point.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(t,e,i,o,s){var r,n,a,h,p=i.seriesTypes,d=p.bubble,c=p.pie;p.sunburst;var f=s.addEvent,u=s.defined,l=s.find,y=s.isNumber;return n=[],(r=h||(h={})).compose=function(t,i){var o=a.prototype,r=o.chartGetZData,h=o.seriesAfterInit,p=o.seriesAfterRender,d=o.seriesGetCenter,u=o.seriesShowOrHide,l=o.seriesTranslate;return c.prototype.onPointSupported=!0,s.pushUnique(n,t)&&(f(e,"afterInit",h),f(e,"afterRender",p),f(e,"afterGetCenter",d),f(e,"hide",u),f(e,"show",u),f(e,"translate",l)),s.pushUnique(n,i)&&(f(i,"beforeRender",r),f(i,"beforeRedraw",r)),t},a=function(){function e(t){this.getRadii=d.prototype.getRadii,this.getRadius=d.prototype.getRadius,this.getPxExtremes=d.prototype.getPxExtremes,this.getZExtremes=d.prototype.getZExtremes,this.chart=t.chart,this.series=t,this.options=t.options.onPoint}return e.prototype.drawConnector=function(){this.connector||(this.connector=this.series.chart.renderer.path().addClass("highcharts-connector-seriesonpoint").attr({zIndex:-1}).add(this.series.markerGroup));var t=this.getConnectorAttributes();t&&this.connector.animate(t)},e.prototype.getConnectorAttributes=function(){var e=this.series.chart,i=this.options;if(i){var s=i.connectorOptions||{},r=i.position,n=e.get(i.id);if(n instanceof t&&r&&u(n.plotX)&&u(n.plotY)){var a=u(r.x)?r.x:n.plotX,h=u(r.y)?r.y:n.plotY,p=a+(r.offsetX||0),d=h+(r.offsetY||0),c=s.width||1,f=s.stroke||this.series.color,l=s.dashstyle,y={d:o.prototype.crispLine([["M",a,h],["L",p,d]],c,"ceil"),"stroke-width":c};return e.styledMode||(y.stroke=f,y.dashstyle=l),y}}},e.prototype.seriesAfterInit=function(){this.onPointSupported&&this.options.onPoint&&(this.bubblePadding=!0,this.useMapGeometry=!0,this.onPoint=new e(this))},e.prototype.seriesAfterRender=function(){delete this.chart.bubbleZExtremes,this.onPoint&&this.onPoint.drawConnector()},e.prototype.seriesGetCenter=function(e){var i=this.options.onPoint,o=e.positions;if(i){var s=this.chart.get(i.id);s instanceof t&&u(s.plotX)&&u(s.plotY)&&(o[0]=s.plotX,o[1]=s.plotY);var r=i.position;r&&(u(r.x)&&(o[0]=r.x),u(r.y)&&(o[1]=r.y),r.offsetX&&(o[0]+=r.offsetX),r.offsetY&&(o[1]+=r.offsetY))}var n=this.radii&&this.radii[this.index];y(n)&&(o[2]=2*n),e.positions=o},e.prototype.seriesShowOrHide=function(){var t=this.chart.series;this.points.forEach(function(e){var i=l(t,function(t){var i=((t.onPoint||{}).options||{}).id;return!!i&&i===e.id});i&&i.setVisible(!i.visible,!1)})},e.prototype.seriesTranslate=function(){this.onPoint&&(this.onPoint.getRadii(),this.radii=this.onPoint.radii)},e.prototype.chartGetZData=function(){var t=[];this.series.forEach(function(e){var i=e.options.onPoint;t.push(i&&i.z?i.z:null)}),this.series.forEach(function(e){e.onPoint&&(e.onPoint.zData=e.zData=t)})},e}(),r.Additions=a,h}),i(e,"masters/modules/series-on-point.src.js",[e["Series/SeriesOnPointComposition.js"]],function(e){e.compose(t.Series,t.Chart)})});//# sourceMappingURL=series-on-point.js.map