UNPKG

highcharts

Version:
14 lines 4.91 kB
!/** * Highstock JS v12.6.0 (2026-04-13) * @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(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/aroon-oscillator",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/aroon-oscillator"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(t,e)=>(()=>{"use strict";var r,o={512:t=>{t.exports=e},944:e=>{e.exports=t}},a={};function i(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return o[t](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};i.d(n,{default:()=>b});var s=i(944),l=i.n(s),p=i(512),h=i.n(p);let{doc:c,win:u}=l();function f(t){return y(t)&&"number"==typeof t.nodeType}function y(t,e){let r;return!!t&&"object"==typeof t&&(!e||"[object Array]"!==(r=Object.prototype.toString.call(t))&&"[object Array Iterator]"!==r)}function g(t,...e){let r,o=[t,...e],a={},i=function(t,e){return"object"!=typeof t&&(t={}),function(t,e,r){for(let r in t)Object.hasOwnProperty.call(t,r)&&e.call((0,t[r]),t[r],r,t)}(e,function(r,o){if("__proto__"!==o&&"constructor"!==o){let a;!y(r,!0)||(a=r?.constructor,y(r,!0)&&!f(r)&&a?.name&&"Object"!==a.name)||f(r)?t[o]=e[o]:t[o]=i(t[o]||{},r)}}),t};!0===t&&(a=o[1],o=Array.prototype.slice.call(o,2));let n=o.length;for(r=0;r<n;r++)a=i(a,o[r]);return a}Array.prototype.find;let{sma:{prototype:d}}=h().seriesTypes;!function(t){let e=["bottomLine"],r=["top","bottom"],o=["top"];function a(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function i(t,e){let r=[];return(t.pointArrayMap||[]).forEach(t=>{t!==e&&r.push(a(t))}),r}function n(){let t=this,e=t.pointValKey,r=t.linesApiNames,o=t.areaLinesNames,n=t.points,l=t.options,p=t.graph,h={options:{gapSize:l.gapSize}},c=[],u=i(t,e),f=n.length,y;if(u.forEach((t,e)=>{for(c[e]=[];f--;)y=n[f],c[e].push({x:y.x,plotX:y.plotX,plotY:y[t],isNull:null==y[t]});f=n.length}),t.userOptions.fillColor&&o.length){let e=c[u.indexOf(a(o[0]))],r=1===o.length?n:c[u.indexOf(a(o[1]))],i=t.color;t.points=r,t.nextPoints=e,t.color=t.userOptions.fillColor,t.options=g(n,h),t.graph=t.area,t.fillGraph=!0,d.drawGraph.call(t),t.area=t.graph,delete t.nextPoints,delete t.fillGraph,t.color=i}r.forEach((e,r)=>{c[r]?(t.points=c[r],l[e]?t.options=g(l[e].styles,h):(0,s.error)('Error: "There is no '+e+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),t.graph=t["graph"+e],d.drawGraph.call(t),t["graph"+e]=t.graph):(0,s.error)('Error: "'+e+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),t.points=n,t.options=l,t.graph=p,d.drawGraph.call(t)}function l(t){let e,r=[],o=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=d.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",r=d.getGraphPath.call(this,t),o=e.slice(0,r.length);for(let t=o.length-1;t>=0;t--)r.push(o[t])}}else r=d.getGraphPath.apply(this,arguments);return r}function p(t){let e=[];return(this.pointArrayMap||[]).forEach(r=>{e.push(t[r])}),e}function h(){let t=this.pointArrayMap,e=[],r;e=i(this),d.translate.apply(this,arguments),this.points.forEach(o=>{t.forEach((t,a)=>{r=o[t],this.dataModify&&(r=this.dataModify.modifyValue(r)),null!==r&&(o[e[a]]=this.yAxis.toPixels(r,!0))})})}t.compose=function(t){let a=t.prototype;return a.linesApiNames=a.linesApiNames||e.slice(),a.pointArrayMap=a.pointArrayMap||r.slice(),a.pointValKey=a.pointValKey||"top",a.areaLinesNames=a.areaLinesNames||o.slice(),a.drawGraph=n,a.getGraphPath=l,a.toYData=p,a.translate=h,t}}(r||(r={}));let m=r,{aroon:x}=h().seriesTypes;class A extends x{getValues(t,e){let r,o,a=[],i=[],n=[],s=super.getValues.call(this,t,e);for(o=0;o<s.yData.length;o++)r=s.yData[o][0]-s.yData[o][1],a.push([s.xData[o],r]),i.push(s.xData[o]),n.push(r);return{values:a,xData:i,yData:n}}}A.defaultOptions=g(x.defaultOptions,{tooltip:{pointFormat:'<span style="color:{point.color}">●</span><b> {series.name}</b>: {point.y}'}}),function(t,e){let r;for(r in t||(t={}),e)t[r]=e[r]}(A.prototype,{nameBase:"Aroon Oscillator",linesApiNames:[],pointArrayMap:["y"],pointValKey:"y"}),m.compose(x),h().registerSeriesType("aroonoscillator",A);let b=l();return n.default})());