9 lines
2.2 KiB
JavaScript
9 lines
2.2 KiB
JavaScript
|
!/**
|
||
|
* Highcharts JS v11.4.1 (2024-04-04)
|
||
|
*
|
||
|
* Dot plot series type for Highcharts
|
||
|
*
|
||
|
* (c) 2010-2024 Torstein Honsi
|
||
|
*
|
||
|
* 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/dotplot",["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,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/DotPlot/DotPlotSeriesDefaults.js",[],function(){return{itemPadding:.2,marker:{symbol:"circle",states:{hover:{},select:{}}}}}),i(e,"Series/DotPlot/DotPlotSeries.js",[e["Series/DotPlot/DotPlotSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{column:s}=e.seriesTypes,{extend:o,merge:r,pick:n}=i;class d extends s{drawPoints(){let t=this.options,e=this.chart.renderer,i=t.marker,s=this.yAxis.transA*t.itemPadding,r=this.borderWidth%2?.5:1;for(let t of this.points){let d,l,a,h,c,u,p;let f=t.marker||{},m=f.symbol||i.symbol,y=n(f.radius,i.radius),g="rect"!==m;t.graphics=a=t.graphics||[];let A=t.pointAttr?t.pointAttr[t.selected?"selected":""]||this.pointAttr[""]:this.pointAttribs(t,t.selected&&"select");if(delete A.r,this.chart.styledMode&&(delete A.stroke,delete A["stroke-width"]),null!==t.y){t.graphic||(t.graphic=e.g("point").add(this.group)),c=n(t.stackY,t.y),h=Math.min(t.pointWidth,this.yAxis.transA-s);let i=Math.floor(c);for(d=c;d>c-t.y;d--,i--){u=t.barX+(g?t.pointWidth/2-h/2:0),p=this.yAxis.toPixels(d,!0)+s/2,this.options.crisp&&(u=Math.round(u)-r,p=Math.round(p)+r),l={x:u,y:p,width:Math.round(g?h:t.pointWidth),height:Math.round(h),r:y};let n=a[i];n?n.animate(l):n=e.symbol(m).attr(o(l,A)).add(t.graphic),n.isActive=!0,a[i]=n}}let P=-1;for(let t of a)++P,t&&(t.isActive?t.isActive=!1:(t.destroy(),a.splice(P,1)))}}}return d.defaultOptions=r(s.defaultOptions,t),o(d.prototype,{markerAttribs:void 0}),e.registerSeriesType("dotplot",d),d}),i(e,"masters/modules/dotplot.src.js",[e["Core/Globals.js"]],function(t){return t})});
|