UNPKG

highcharts

Version:
14 lines 4.41 kB
!/** * Highstock JS v13.0.1 (2026-08-17) * @module highcharts/indicators/aroon-oscillator * @requires highcharts * @requires highcharts/modules/stock * * Indicator series type for Highcharts Stock * * (c) 2010-2026 Highsoft AS * Author: Wojciech Chmiel * * A commercial license may be required depending on use, * see www.highcharts.com/license */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/aroon-oscillator",["highcharts/highcharts"],function(e){return t(e,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/aroon-oscillator"]=t(e._Highcharts,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t)=>(()=>{"use strict";var r,o={512(e){e.exports=t},944(t){t.exports=e}};let a={};function i(e){let t=a[e];if(void 0!==t)return t.exports;let r=a[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.n=e=>{let t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],a=t[r++];i.o(e,o)?0===a&&r++:0===a?Object.defineProperty(e,o,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,o,{enumerable:!0,get:a})}else for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let s={};i.d(s,{default:()=>g});var n=i(944),l=i.n(n),p=i(512),h=i.n(p);let{sma:{prototype:c}}=h().seriesTypes;!function(e){let t=["bottomLine"],r=["top","bottom"],o=["top"];function a(e){return"plot"+e.charAt(0).toUpperCase()+e.slice(1)}function i(e,t){let r=[];return(e.pointArrayMap||[]).forEach(e=>{e!==t&&r.push(a(e))}),r}function s(){let e=this,t=e.pointValKey,r=e.linesApiNames,o=e.areaLinesNames,s=e.points,l=e.options,p=e.graph,h={options:{gapSize:l.gapSize}},f=[],u=i(e,t),y=s.length,g;if(u.forEach((e,t)=>{for(f[t]=[];y--;)g=s[y],f[t].push({x:g.x,plotX:g.plotX,plotY:g[e],isNull:!(0,n.defined)(g[e])});y=s.length}),e.userOptions.fillColor&&o.length){let t=f[u.indexOf(a(o[0]))],r=1===o.length?s:f[u.indexOf(a(o[1]))],i=e.color;e.points=r,e.nextPoints=t,e.color=e.userOptions.fillColor,e.options=(0,n.merge)(s,h),e.graph=e.area,e.fillGraph=!0,c.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=i}r.forEach((t,r)=>{f[r]?(e.points=f[r],l[t]?e.options=(0,n.merge)(l[t].styles,h):(0,n.error)('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),e.graph=e["graph"+t],c.drawGraph.call(e),e["graph"+t]=e.graph):(0,n.error)('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=s,e.options=l,e.graph=p,c.drawGraph.call(e)}function l(e){let t,r=[],o=[];if(e=e||this.points,this.fillGraph&&this.nextPoints){if((t=c.getGraphPath.call(this,this.nextPoints))&&t.length){t[0][0]="L",r=c.getGraphPath.call(this,e),o=t.slice(0,r.length);for(let e=o.length-1;e>=0;e--)r.push(o[e])}}else r=c.getGraphPath.apply(this,arguments);return r}function p(e){let t=[];return(this.pointArrayMap||[]).forEach(r=>{t.push(e[r])}),t}function h(){let e=this.pointArrayMap,t=[],r;t=i(this),c.translate.apply(this,arguments),this.points.forEach(o=>{e.forEach((e,a)=>{r=o[e],this.dataModify&&(r=this.dataModify.modifyValue(r)),null!==r&&(o[t[a]]=this.yAxis.toPixels(r,!0))})})}e.compose=function(e){let a=e.prototype;return a.linesApiNames=a.linesApiNames||t.slice(),a.pointArrayMap=a.pointArrayMap||r.slice(),a.pointValKey=a.pointValKey||"top",a.areaLinesNames=a.areaLinesNames||o.slice(),a.drawGraph=s,a.getGraphPath=l,a.toYData=p,a.translate=h,e}}(r||(r={}));let f=r,{aroon:u}=h().seriesTypes;class y extends u{getValues(e,t){let r,o,a=[],i=[],s=[],n=super.getValues.call(this,e,t);for(o=0;o<n.yData.length;o++)r=n.yData[o][0]-n.yData[o][1],a.push([n.xData[o],r]),i.push(n.xData[o]),s.push(r);return{values:a,xData:i,yData:s}}}y.defaultOptions=(0,n.merge)(u.defaultOptions,{tooltip:{pointFormat:'<span style="color:{point.color}">●</span><b> {series.name}</b>: {point.y}'}}),(0,n.extend)(y.prototype,{nameBase:"Aroon Oscillator",linesApiNames:[],pointArrayMap:["y"],pointValKey:"y"}),f.compose(u),h().registerSeriesType("aroonoscillator",y);let g=l();return s.default})());