highcharts
Version:
JavaScript charting framework
12 lines • 5.9 kB
JavaScript
!/**
* Highcharts JS v12.4.0 (2025-09-04)
* @module highcharts/modules/series-on-point
* @requires highcharts
*
* Series on point module
*
* (c) 2010-2025 Highsoft AS
* Author: Rafal Sebestjanski and Piotr Madej
*
* License: www.highcharts.com/license
*/function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.Point,t._Highcharts.SeriesRegistry,t._Highcharts.SVGRenderer):"function"==typeof define&&define.amd?define("highcharts/modules/series-on-point",["highcharts/highcharts"],function(t){return e(t,t.Point,t.SeriesRegistry,t.SVGRenderer)}):"object"==typeof exports?exports["highcharts/modules/series-on-point"]=e(t._Highcharts,t._Highcharts.Point,t._Highcharts.SeriesRegistry,t._Highcharts.SVGRenderer):t.Highcharts=e(t.Highcharts,t.Highcharts.Point,t.Highcharts.SeriesRegistry,t.Highcharts.SVGRenderer)}("undefined"==typeof window?this:window,(t,e,s,o)=>(()=>{"use strict";var i,r,n={260:t=>{t.exports=e},512:t=>{t.exports=s},540:t=>{t.exports=o},944:e=>{e.exports=t}},h={};function a(t){var e=h[t];if(void 0!==e)return e.exports;var s=h[t]={exports:{}};return n[t](s,s.exports,a),s.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var l={};a.d(l,{default:()=>T});var c=a(944),u=a.n(c);!function(t){t.setLength=function(t,e,s){return Array.isArray(t)?(t.length=e,t):t[s?"subarray":"slice"](0,e)},t.splice=function(t,e,s,o,i=[]){if(Array.isArray(t))return Array.isArray(i)||(i=Array.from(i)),{removed:t.splice(e,s,...i),array:t};let r=Object.getPrototypeOf(t).constructor,n=t[o?"subarray":"slice"](e,e+s),h=new r(t.length-s+i.length);return h.set(t.subarray(0,e),0),h.set(i,e),h.set(t.subarray(e+s),e+i.length),{removed:n,array:h}}}(i||(i={}));let{setLength:p,splice:d}=i,{fireEvent:f,objectEach:g,uniqueKey:y}=u(),m=class{constructor(t={}){this.autoId=!t.id,this.columns={},this.id=t.id||y(),this.modified=this,this.rowCount=0,this.versionTag=y();let e=0;g(t.columns||{},(t,s)=>{this.columns[s]=t.slice(),e=Math.max(e,t.length)}),this.applyRowCount(e)}applyRowCount(t){this.rowCount=t,g(this.columns,(e,s)=>{e.length!==t&&(this.columns[s]=p(e,t))})}deleteRows(t,e=1){if(e>0&&t<this.rowCount){let s=0;g(this.columns,(o,i)=>{this.columns[i]=d(o,t,e).array,s=o.length}),this.rowCount=s}f(this,"afterDeleteRows",{rowIndex:t,rowCount:e}),this.versionTag=y()}getColumn(t,e){return this.columns[t]}getColumns(t,e){return(t||Object.keys(this.columns)).reduce((t,e)=>(t[e]=this.columns[e],t),{})}getRow(t,e){return(e||Object.keys(this.columns)).map(e=>this.columns[e]?.[t])}setColumn(t,e=[],s=0,o){this.setColumns({[t]:e},s,o)}setColumns(t,e,s){let o=this.rowCount;g(t,(t,e)=>{this.columns[e]=t.slice(),o=t.length}),this.applyRowCount(o),s?.silent||(f(this,"afterSetColumns"),this.versionTag=y())}setRow(t,e=this.rowCount,s,o){let{columns:i}=this,r=s?this.rowCount+1:e+1;g(t,(t,n)=>{let h=i[n]||o?.addColumns!==!1&&Array(r);h&&(s?h=d(h,e,0,!0,[t]).array:h[e]=t,i[n]=h)}),r>this.rowCount&&this.applyRowCount(r),o?.silent||(f(this,"afterSetRows"),this.versionTag=y())}};var w=a(260),C=a.n(w),b=a(512),x=a.n(b),P=a(540),R=a.n(P);let{composed:v}=u(),{bubble:S}=x().seriesTypes,{addEvent:H,defined:A,find:O,isNumber:_,pushUnique:G}=u();!function(t){t.compose=function(t,s){if(G(v,"SeriesOnPoint")){let{chartGetZData:o,seriesAfterInit:i,seriesAfterRender:r,seriesGetCenter:n,seriesShowOrHide:h,seriesTranslate:a}=e.prototype;t.types.pie.prototype.onPointSupported=!0,H(t,"afterInit",i),H(t,"afterRender",r),H(t,"afterGetCenter",n),H(t,"hide",h),H(t,"show",h),H(t,"translate",a),H(s,"beforeRender",o),H(s,"beforeRedraw",o)}return t};class e{constructor(t){this.getColumn=S.prototype.getColumn,this.getRadii=S.prototype.getRadii,this.getRadius=S.prototype.getRadius,this.getPxExtremes=S.prototype.getPxExtremes,this.getZExtremes=S.prototype.getZExtremes,this.chart=t.chart,this.series=t,this.options=t.options.onPoint}drawConnector(){this.connector||(this.connector=this.series.chart.renderer.path().addClass("highcharts-connector-seriesonpoint").attr({zIndex:-1}).add(this.series.markerGroup));let t=this.getConnectorAttributes();t&&this.connector.animate(t)}getConnectorAttributes(){let t=this.series.chart,e=this.options;if(!e)return;let s=e.connectorOptions||{},o=e.position,i=t.get(e.id);if(!(i instanceof C())||!o||!A(i.plotX)||!A(i.plotY))return;let r=A(o.x)?o.x:i.plotX,n=A(o.y)?o.y:i.plotY,h=r+(o.offsetX||0),a=n+(o.offsetY||0),l=s.width||1,c=s.stroke||this.series.color,u=s.dashstyle,p={d:R().prototype.crispLine([["M",r,n],["L",h,a]],l),"stroke-width":l};return t.styledMode||(p.stroke=c,p.dashstyle=u),p}seriesAfterInit(){this.onPointSupported&&this.options.onPoint&&(this.bubblePadding=!0,this.useMapGeometry=!0,this.onPoint=new e(this))}seriesAfterRender(){delete this.chart.bubbleZExtremes,this.onPoint&&this.onPoint.drawConnector()}seriesGetCenter(t){let e=this.options.onPoint,s=t.positions;if(e){let t=this.chart.get(e.id);t instanceof C()&&A(t.plotX)&&A(t.plotY)&&(s[0]=t.plotX,s[1]=t.plotY);let o=e.position;o&&(A(o.x)&&(s[0]=o.x),A(o.y)&&(s[1]=o.y),o.offsetX&&(s[0]+=o.offsetX),o.offsetY&&(s[1]+=o.offsetY))}let o=this.radii&&this.radii[this.index];_(o)&&(s[2]=2*o),t.positions=s}seriesShowOrHide(){let t=this.chart.series;this.points?.forEach(e=>{let s=O(t,t=>{let s=((t.onPoint||{}).options||{}).id;return!!s&&s===e.id});s&&s.setVisible(!s.visible,!1)})}seriesTranslate(){this.onPoint&&(this.onPoint.getRadii(),this.radii=this.onPoint.radii)}chartGetZData(){let t=[];this.series.forEach(e=>{let s=e.options.onPoint;t.push(s?.z??null)});let e=new m({columns:{z:t}});this.series.forEach(t=>{t.onPoint&&(t.onPoint.dataTable=t.dataTable=e)})}}t.Additions=e}(r||(r={}));let j=r,E=u();j.compose(E.Series,E.Chart);let T=u();return l.default})());