highcharts
Version:
JavaScript charting framework
14 lines • 3.96 kB
JavaScript
/**
* Highstock JS v12.6.0 (2026-04-13)
* @module highcharts/modules/price-indicator
* @requires highcharts
* @requires highcharts/modules/stock
*
* Advanced Highcharts Stock tools
*
* (c) 2010-2026 Highsoft AS
* Author: Torstein Hønsi
*
* A commercial license may be required depending on use.
* See www.highcharts.com/license
*/import*as e from"../highcharts.js";var t={};t.n=e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},t.d=(e,s)=>{for(var r in s)t.o(s,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:s[r]})},t.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let s=e.default;var r=t.n(s);let{doc:i,win:o}=r();function l(e,t,s,i={}){let o="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let c=o.hcEvents;r().Point&&e instanceof r().Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);let a=e.addEventListener;a&&a.call(e,t,s,!!r().supportsPassiveEvents&&{passive:void 0===i.passive?-1!==t.indexOf("touch"):i.passive,capture:!1}),c[t]||(c[t]=[]);let h={fn:s,order:"number"==typeof i.order?i.order:1/0};return c[t].push(h),c[t].sort((e,t)=>e.order-t.order),function(){!function(e,t,s){function r(t,s){let r=e.removeEventListener;r&&r.call(e,t,s,!1)}function i(s){let i,o;e.nodeName&&(t?(i={})[t]=!0:i=s,n(i,function(e,t){if(s[t])for(o=s[t].length;o--;)r(t,s[t][o].fn)}))}let o="function"==typeof e&&e.prototype||e;if(Object.hasOwnProperty.call(o,"hcEvents")){let e=o.hcEvents;if(t){let o=e[t]||[];s?(e[t]=o.filter(function(e){return s!==e.fn}),r(t,s)):(i(e),e[t]=[])}else i(e),delete o.hcEvents}}(e,t,s)}}function c(e){return a(e)&&"number"==typeof e.nodeType}function a(e,t){let s;return!!e&&"object"==typeof e&&(!t||"[object Array]"!==(s=Object.prototype.toString.call(e))&&"[object Array Iterator]"!==s)}function n(e,t,s){for(let r in e)Object.hasOwnProperty.call(e,r)&&t.call(s||e[r],e[r],r,e)}Array.prototype.find;let{composed:h}=r();function f(){let e=this;["lastPrice","lastPriceLabel","lastVisiblePrice","lastVisiblePriceLabel"].forEach(t=>{e[t]?.hide()})}function p(){let e=this.options,t=e.lastVisiblePrice,s=e.lastPrice;if((t||s)&&"highcharts-navigator-series"!==e.id&&this.visible){let r=this.xAxis,i=this.yAxis,o=i.crosshair,l=i.cross,h=i.crossLabel,f=this.points,p=f.length,u=this.dataTable.rowCount,b=this.getColumn("x")[u-1],d=this.getColumn("y")[u-1]??this.getColumn("close")[u-1];if(s&&s.enabled&&(i.crosshair=i.options.crosshair=e.lastPrice,!this.chart.styledMode&&i.crosshair&&i.options.crosshair&&e.lastPrice&&(i.crosshair.color=i.options.crosshair.color=e.lastPrice.color||this.color),i.cross=this.lastPrice,this.lastPriceLabel&&this.lastPriceLabel.destroy(),delete i.crossLabel,i.drawCrosshair(null,{x:b,y:d,plotX:r.toPixels(b,!0),plotY:i.toPixels(d,!0)}),this.yAxis.cross&&(this.lastPrice=this.yAxis.cross,this.lastPrice.addClass("highcharts-color-"+this.colorIndex),this.lastPrice.y=d),this.lastPriceLabel=i.crossLabel),t&&t.enabled&&p>0){i.crosshair=i.options.crosshair=function(e,...t){let s,r=[e,...t],i={},o=function(e,t){return"object"!=typeof e&&(e={}),n(t,function(s,r){if("__proto__"!==r&&"constructor"!==r){let i;!a(s,!0)||(i=s?.constructor,a(s,!0)&&!c(s)&&i?.name&&"Object"!==i.name)||c(s)?e[r]=t[r]:e[r]=o(e[r]||{},s)}}),e};!0===e&&(i=r[1],r=Array.prototype.slice.call(r,2));let l=r.length;for(s=0;s<l;s++)i=o(i,r[s]);return i}({color:"transparent"},e.lastVisiblePrice),i.cross=this.lastVisiblePrice;let t=f[p-1].isInside?f[p-1]:f[p-2];this.lastVisiblePriceLabel&&this.lastVisiblePriceLabel.destroy(),delete i.crossLabel,i.drawCrosshair(null,t),i.cross&&(this.lastVisiblePrice=i.cross,t&&"number"==typeof t.y&&(this.lastVisiblePrice.y=t.y)),this.lastVisiblePriceLabel=i.crossLabel}i.crosshair=i.options.crosshair=o,i.cross=l,i.crossLabel=h}}({compose:function(e){var t;t="PriceIndication",0>h.indexOf(t)&&h.push(t)&&(l(e,"afterRender",p),l(e,"hide",f))}}).compose(r().Series);let u=r();export{u as default};