"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();import ColumnSeries from"../Column/ColumnSeries.js";import LineSeries from"../Line/LineSeries.js";import SeriesRegistry from"../../Core/Series/SeriesRegistry.js";import U from"../../Core/Utilities.js";var addEvent=U.addEvent,extend=U.extend,merge=U.merge,ScatterSeries=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return __extends(e,t),e.prototype.applyJitter=function(){var t=this,e=this.options.jitter,r=this.points.length;e&&this.points.forEach(function(i,o){["x","y"].forEach(function(n,s){var a,p,l,c,d,u,h="plot"+n.toUpperCase();e[n]&&!i.isNull&&(a=t[n+"Axis"],c=e[n]*a.transA,a&&!a.isLog&&(p=Math.max(0,i[h]-c),l=Math.min(a.len,i[h]+c),i[h]=p+(l-p)*(d=o+s*r,(u=1e4*Math.sin(d))-Math.floor(u)),"x"===n&&(i.clientX=i.plotX)))})})},e.prototype.drawGraph=function(){(this.options.lineWidth||0===this.options.lineWidth&&this.graph&&this.graph.strokeWidth())&&t.prototype.drawGraph.call(this)},e.defaultOptions=merge(LineSeries.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'● {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}}),e}(LineSeries);extend(ScatterSeries.prototype,{drawTracker:ColumnSeries.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),addEvent(ScatterSeries,"afterTranslate",function(){this.applyJitter()}),SeriesRegistry.registerSeriesType("scatter",ScatterSeries);export default ScatterSeries;