Release v19.033 (from 6e7d81de)
Fixes tradingview/charting_library#5762
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -258,7 +258,7 @@ pe.prototype.start=function(e,t){var i=this._model.mainSeries();if(i.isStarted()
|
||||
Q.emit("study_properties_changed",this._id)},pe.prototype._isModifiedStudyInputs=function(e){if(void 0===this._oldStudyInputs)return this._oldStudyInputs=e,!0;var t=Object.keys(this._oldStudyInputs);return s(t.length===Object.keys(e).length,"keys quantity should be equal"),t.forEach((function(t){s(e.hasOwnProperty(t),"key '"+t+"' should existing in studyInputs"),this._oldStudyInputs[t]!==e[t]&&(this._oldStudyInputs=e)}),this),this._oldStudyInputs===e},pe.prototype.visibleChanged=function(){this._series instanceof TradingView.Series&&this._series.invalidateBarColorerCache()},pe.prototype.processHibernate=function(){this.isHibernateAllowed()&&(!this._studyId&&this.isVisible()&&this.start(),this._studyId&&!this.isVisible()&&this.stop())},pe.prototype.isHibernated=function(){return!this.isVisible()&&!this._studyId},pe.prototype.isHibernateAllowed=function(){return!this.hasChildren()},pe.prototype.priceLabelText=function(e){var t,i=this._metaInfo.styles,n=this._metaInfo.ohlcPlots;i&&i[e]&&(t=i[e]),n&&n[e]&&(t=n[e]);var r=t.title;return 1!==this._simplePlotsCount||$.isPlotTitleDefined(r)?this._metaInfo.is_price_study&&r!==this._metaInfo.shortDescription?""===r?this._metaInfo.shortDescription:this._metaInfo.shortDescription+":"+r:r:this._metaInfo.shortDescription},pe.prototype.createPriceAxisView=function(e){return new _(this,{plotIndex:e})},pe.prototype.createPriceLineAxisView=function(e){return new ie(this,e)},pe.prototype.createViews=function(){this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._paneViews=[],this._labelPaneViews=[];var e={};if(this._priceAxisViewsCache={},this.metaInfo().plots)for(var t=0;t<this.metaInfo().plots.length;t++)if(!(this.isSelfColorerPlot(t)||this.isTextColorerPlot(t)||this.isBarColorerPlot(t)||this.isOHLCColorerPlot(t)||this.isAlertConditionPlot(t))){var i=this.metaInfo().plots[t].id;if(this.isBgColorerPlot(t))this._paneViews.push(new g(this,this._series,this._model,i));else if(this.isPlotShapesPlot(t))this._paneViews.push(new b(this,this._series,this._model,i));else if(this.isPlotCharsPlot(t))this._paneViews.push(new S(this,this._series,this._model,i));else if(this.isPlotArrowsPlot(t))this._paneViews.push(new w(this,this._series,this._model,i));else if(this.isOHLCSeriesPlot(t)){var n=this.metaInfo().plots[t].target;if(e[n])continue;e[n]=n,this.isOHLCBarsPlot(t)?this._paneViews.push(new P(this,this._series,this._model,n)):this.isOHLCCandlesPlot(t)&&this._paneViews.push(new C(this,this._series,this._model,n));var r=this.createPriceAxisView(n);this._priceAxisViewsCache[n]=r,this._priceAxisViewsBase.push(r),this._labelPaneViews.push(new m(r,this,this._model))}else{r=this.createPriceAxisView(i);this._priceAxisViewsCache[i]=r,this._priceAxisViewsBase.push(r),this._priceLinesAxisViews.push(this.createPriceLineAxisView(i)),this._paneViews.push(new y(this,this._series,this._model,i)),this.properties().styles[i].trackPrice.value()&&this._paneViews.push(new u(this,i)),this._labelPaneViews.push(new m(r,this,this._model))}}
|
||||
if(this._properties.bands)for(t=0;t<this._properties.bands.childCount();t++)this._properties.bands[t].visible.value()&&this._paneViews.push(new d(this._properties.bands[t],this));this._properties.bandsBackground&&this._paneViews.push(new p(this));var o=this._paneViews;if(N(this,this.model()).then(function(e){for(var t=0;t<e.length;t++)o.push(e[t]);this._model.lightUpdate()}.bind(this)),this._properties.areaBackground&&this._paneViews.push(new I(this)),this._properties.filledAreas&&this._metaInfo.filledAreas)for(t=0;t<this._metaInfo.filledAreas.length;++t){var s=this._metaInfo.filledAreas[t],a=this._properties.filledAreasStyle[s.id];s.type===X.FilledArea.TYPE_PLOTS||s.palette?this._paneViews.push(new x(this,s,a)):s.type===X.FilledArea.TYPE_HLINES?this._paneViews.push(new f(this,s,a)):le.logWarn("Unsupported filledArea type: "+s.type)}this._dataWindowView||(this._dataWindowView=this.metaInfo().graphics&&"hhists"in this.metaInfo().graphics?new M(this,this._model):new L(this,this._model)),this._legendView||(this._legendView=this.metaInfo().graphics&&"hhists"in this.metaInfo().graphics?new A(this,this._model):new O(this,this._model)),this._statusView||(this._statusView=new k(this,this._model.properties().scalesProperties.textColor)),this._concatPriceAxisViews()},pe.prototype._concatPriceAxisViews=function(){this._priceAxisViews=[].concat(this._priceAxisViewsBase,this._graphicsPriceAxisViews,this._hlinesPriceAsisViews,this._horizlinesPriceAsisViews)},pe.prototype.recalculate=function(e){var t=this._model.paneForSource(this);this._model.recalculatePane(t,e),this._model.updateSource(this)},pe.prototype.data=function(){return this.m_data},pe.prototype.metaInfo=function(){return this._metaInfo},pe.prototype.graphicsInfo=function(){return this._metaInfo.graphics},pe.prototype.status=function(){return this._status},pe.prototype.title=function(e,t,i,n){i=void 0===i?!this._showStudyArgumentsProperty.value():i;var r=JSON.stringify([e,t,i,n]);if(this._titleStrCache[r])return this._titleStrCache[r];if(this._titleInPartsCache[r])return this._joinTitlesParts(this._titleInPartsCache[r]);var o=this._title(e,t,i,n);return this._titleStrCache[r]=o,o},pe.prototype.titleInParts=function(e,t,i,n){i=void 0===i?!this._showStudyArgumentsProperty.value():i;var r=JSON.stringify([e,t,i,n]);if(this._titleInPartsCache[r])return this._titleInPartsCache[r];var o=this._titleInParts(e,t,i,n);return this._titleInPartsCache[r]=o,o},pe.prototype._title=function(e,t,i,n){var r=this._titleInParts(e,t,i,n);return this._joinTitlesParts(r)},pe.prototype._joinTitlesParts=function(e){var t=e[1]?e[1].join(", "):"";return e[0]+(t.length>0?" ("+t+")":"")},pe.prototype._titleInParts=function(e,t,i,n){var r="";r=e?this._metaInfo.shortDescription||this._properties.shortDescription&&this._properties.shortDescription.value()||"Study":this._metaInfo.description||this._properties.description&&this._properties.description.value()||"Study",t=t||{};var o=[window.t(r)],s=[];if(!i){var a=this._getMTFResolutionInputTitle();if(null!==a&&a.length>0&&o.push(a),
|
||||
(s=this._titleInputs(n,!0)||[]).length>0){var l={};if(this._isChildStudy)for(var c=0;c<this._metaInfo.inputs.length;++c){var u=this._metaInfo.inputs[c];if(X.isSourceInput(u)){var h=u.id,d=this._properties.inputs[h].value();if(d.indexOf("$")>=0&&this._source){var p=this._source.metaInfo(),f=this._source.title(e,null,!0,n);if(1===p.plots.length)l[d]=f;else{var _=d.split("$")[1],m=p.plots[_].id,v=p.styles&&p.styles[m]&&p.styles[m].title||m;l[d]=f+": "+v}}break}}var y=this;s=s.map((function(e){var i=isNumber(e)?y._numericFormatter.format(e):l&&l[e]||e;return t[i]&&(i=t[i]),i}))}}return[o.join(" · "),s]},pe.prototype._getMTFResolutionInputTitle=function(){for(var e=0;e<this._metaInfo.inputs.length;e++){var t=this._metaInfo.inputs[e];if(t.isMTFResolution)return this._properties.inputs[t.id].value()}return null},pe.prototype.invalidateTitleCache=function(e){if(this._titleStrCache={},this._titleInPartsCache={},!0===e&&this._children)for(var t=0;t<this._children.length;++t)this._children[t].invalidateTitleCache(e)},pe.prototype.graphics=function(){return this._graphics},pe.prototype.turnaround=function(e){return!0===e?this.source().turnaround(!0)+"_"+this._turnaround:this._turnaround},pe.prototype._checkTurnaround=function(e){return e===this._turnaround||e===this._model.mainSeries().turnaround()||e===this.turnaround(!0)},pe.prototype._getStatusTextOnStudyError=function(e){var t=e.split(":",2)[0];return t.length>0?window.t(t):""},pe.prototype._handleStudyError=function(e){delete this._loadingStartTime,this._failed=!0,this._loading=!1,this.clearData();e.params[2];this._setStatus(this._getStatusTextOnStudyError(e.params[2])),this._statusView.update(),this._model.updateSource(this)},pe.prototype.onData=function(e){switch(e.method){case"study_loading":this._failed=!1,this._loading=!0,this._setStatus(ue),this._statusView.update(),this._model.updateSource(this),this._loadingStartTime=(new Date).getTime();break;case"study_error":this._handleStudyError(e),this._enablePriceRangeReady();break;case"study_completed":if(!this._checkTurnaround(e.params[1]))return;this._studyModified&&(this.clearData(),this._studyModified=!1);var t="chartSession:"+this._chartApi.sessionId(),i=(new Date).getTime()-this._loadingStartTime;le.logDebug(t+", Study "+this._metaInfo.description+" loading took "+i+" ms"),delete this._loadingStartTime,this._loading=!1,this._setStatus(""),this._statusView.update();var n=this._model.paneForSource(this);this._model.recalculatePane(n),this._updateSources(),this._model.fullUpdate();break;case"study_deleted":break;case"data_update":if(e.params.customId!==this.sourceId()||!this._checkTurnaround(e.params.turnaround))return;s(!!e.params.nonseries,"data.params.nonseries is missing"),this._onDataUpdate(e.params.plots,e.params.nonseries)}},pe.prototype._onDataUpdate=function(e,t){this._studyModified&&(this.clearData(),this._studyModified=!1);var i=l(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),
|
||||
this._ongoingDataUpdate},pe.prototype._onDataUnpacked=function(e,t,i){this._isDestroyed||("nochange"!==t&&this._processPlotOffsets(i),this.transformData(e),this._mergeData(e),null!==i&&(i.indexes_replace?(s("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._onDataUpdated(e,i,t),this.priceRangeReady()||this._enablePriceRangeReady())},pe.prototype._onDataUpdated=function(e,t,i){if(this.hasBarColorer()&&e.length>0){var n=this.barColorer().firstColoredBar(e[0].index);this._model.mainSeries().invalidateBarStylesCache(n)}null!==t&&this._postProcessGraphics();var r=this._model.paneForSource(this);this._model.recalculatePane(r),this._updateSources()},pe.prototype.transformData=function(e){},pe.prototype.moveData=function(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.move(e)}.bind(this))},pe.prototype.replaceData=function(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.remove(e+1),this.m_data.addTail(i,t)},pe.prototype._updateSources=function(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())},pe.processPlotOffsets=function(e,t){t&&t.indexes_replace||(e._plotOffsets=t&&t.offsets||{})},pe.prototype._processPlotOffsets=function(e){pe.processPlotOffsets(this,e)},pe.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.merge(e)},pe.prototype._postProcessGraphics=function(){this._graphicsPriceAxisViews=j(this),this._concatPriceAxisViews()},pe.prototype._getNonPriceParent=function(){if(this._nonPriceParent)return this._nonPriceParent;for(var e=this.source();e instanceof pe;){var t=e.metaInfo();if(!t.is_price_study||"Compare@tv-basicstudies"===t.id)return this._nonPriceParent=e,e;e=e.source()}},pe.prototype.firstValue=function(e){if(!this._isChildStudy&&"Compare@tv-basicstudies"===this._metaInfo.id||!this._metaInfo.is_price_study){var t=this._model.timeScale().visibleBarsStrictRange();if(null===t)return null;var i=t.firstBar(),n=t.lastBar(),r=null,o=this,s=o._metaInfo.plots;return null===r&&this.data().range(i,n).each((function(t,i){for(var n=0;n<s.length;++n)if(!o.isSelfColorerPlot(n)){var a=i[n+1];if(null!=a){var l=s[n].id,c=o.properties().styles[l];if(c.visible&&c.visible.value()&&!(e&&Math.abs(a)<1e-10))return r=a,!0}}return!1})),this._nonPriceFirstValue=r,null!==r?r:this._bandsFirstValue(e)}if(this._isChildStudy){var a=this._getNonPriceParent();if(a&&this.priceScale()===a.priceScale())return void 0!==a._nonPriceFirstValue?a._nonPriceFirstValue:a.firstValue()}return this._series.firstValue()},pe.offset=function(e,t){var i=0;return e._plotOffsets&&void 0!==e._plotOffsets[t]&&(i+=e._plotOffsets[t]),void 0!==e._plotOffsetsMetaInfoOverride[t]?i+=e._plotOffsetsMetaInfoOverride[t]:e.properties().offsets&&void 0!==e.properties().offsets[t]&&(i+=e.properties().offsets[t].val.value()),
|
||||
this._ongoingDataUpdate},pe.prototype._onDataUnpacked=function(e,t,i){this._isDestroyed||(this._processPlotOffsets(i),this.transformData(e),this._mergeData(e),null!==i&&(i.indexes_replace?(s("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._onDataUpdated(e,i,t),this.priceRangeReady()||this._enablePriceRangeReady())},pe.prototype._onDataUpdated=function(e,t,i){if(this.hasBarColorer()&&e.length>0){var n=this.barColorer().firstColoredBar(e[0].index);this._model.mainSeries().invalidateBarStylesCache(n)}null!==t&&this._postProcessGraphics();var r=this._model.paneForSource(this);this._model.recalculatePane(r),this._updateSources()},pe.prototype.transformData=function(e){},pe.prototype.moveData=function(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.move(e)}.bind(this))},pe.prototype.replaceData=function(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.remove(e+1),this.m_data.addTail(i,t)},pe.prototype._updateSources=function(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())},pe.processPlotOffsets=function(e,t){t&&t.indexes_replace||(e._plotOffsets=t&&t.offsets||{})},pe.prototype._processPlotOffsets=function(e){pe.processPlotOffsets(this,e)},pe.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.merge(e)},pe.prototype._postProcessGraphics=function(){this._graphicsPriceAxisViews=j(this),this._concatPriceAxisViews()},pe.prototype._getNonPriceParent=function(){if(this._nonPriceParent)return this._nonPriceParent;for(var e=this.source();e instanceof pe;){var t=e.metaInfo();if(!t.is_price_study||"Compare@tv-basicstudies"===t.id)return this._nonPriceParent=e,e;e=e.source()}},pe.prototype.firstValue=function(e){if(!this._isChildStudy&&"Compare@tv-basicstudies"===this._metaInfo.id||!this._metaInfo.is_price_study){var t=this._model.timeScale().visibleBarsStrictRange();if(null===t)return null;var i=t.firstBar(),n=t.lastBar(),r=null,o=this,s=o._metaInfo.plots;return null===r&&this.data().range(i,n).each((function(t,i){for(var n=0;n<s.length;++n)if(!o.isSelfColorerPlot(n)){var a=i[n+1];if(null!=a){var l=s[n].id,c=o.properties().styles[l];if(c.visible&&c.visible.value()&&!(e&&Math.abs(a)<1e-10))return r=a,!0}}return!1})),this._nonPriceFirstValue=r,null!==r?r:this._bandsFirstValue(e)}if(this._isChildStudy){var a=this._getNonPriceParent();if(a&&this.priceScale()===a.priceScale())return void 0!==a._nonPriceFirstValue?a._nonPriceFirstValue:a.firstValue()}return this._series.firstValue()},pe.offset=function(e,t){var i=0;return e._plotOffsets&&void 0!==e._plotOffsets[t]&&(i+=e._plotOffsets[t]),void 0!==e._plotOffsetsMetaInfoOverride[t]?i+=e._plotOffsetsMetaInfoOverride[t]:e.properties().offsets&&void 0!==e.properties().offsets[t]&&(i+=e.properties().offsets[t].val.value()),
|
||||
e.properties().offset&&(i+=e.properties().offset.val.value()),i},pe.prototype.offset=function(e){return pe.offset(this,e)},pe.prototype.priceRange=function(e,t){if(TradingView.isInteger(e)){if(TradingView.isInteger(t)){for(var i,n,o=null,s=this._metaInfo,a=[],l=null,c=0;c<s.plots.length;++c)if(!(this.isSelfColorerPlot(c)||this.isTextColorerPlot(c)||this.isBarColorerPlot(c)||this.isBgColorerPlot(c)||this.isOHLCColorerPlot(c)||this.isAlertConditionPlot(c))){var u,h=s.plots[c].id;if(this.isOHLCSeriesPlot(c)){var d=s.plots[c].target;u=this.properties().ohlcPlots[d]}else u=this.properties().styles[h];if(u.visible.value()){if(n=null,u.location&&(n=u.location.value()),!i){var p=[J.Absolute,J.Top,J.Bottom].indexOf(n)<0;i=(this.isPlotShapesPlot(c)||this.isPlotCharsPlot(c))&&p||this.isPlotArrowsPlot(c)}if(this.isLinePlot(c)||(this.isPlotShapesPlot(c)||this.isPlotCharsPlot(c))&&u.location.value()===J.Absolute||this.isOHLCSeriesPlot(c)){var f={name:h,offset:this.offset(h)},_=this.properties().styles[h].plottype.value();if(!this.properties().skipHistogramBaseOnAutoScale&&[ee.Histogram,ee.Columns,ee.Area].indexOf(_)>=0){var m=this.properties().styles[h].histogramBase.value(),v=this.m_data.minMaxOnRangeCached(e,t,[f]);isNumber(m)&&null!==v&&(l=Z(l,{min:m,max:m}),l=Z(l,v))}else a.push(f)}}}var y=this.m_data.minMaxOnRangeCached(e,t,a);if(y=Z(l,y),i){a=[{name:"low",offset:0},{name:"high",offset:0}];var g=this.series().data().bars().minMaxOnRangeCached(e,t,a);y=Z(y,g)}if(null!==y&&(o=new r(y.min,y.max)),s.bands)for(c=0;c<s.bands.length;c++)if(this.properties().bands[c].visible.value()){m=this.properties().bands[c].value.value();if(!isNumber(m))continue;o?o.apply(m,m):o=new r(m,m)}return this._postProcessPriceRange(o)}le.logDebug("priceRange: incorrect endBar")}else le.logDebug("priceRange: incorrect startBar")},pe.prototype._postProcessPriceRange=function(e){if(e&&e.minValue()===e.maxValue()&&!this.metaInfo().is_price_study){var t=.005*e.minValue();e=new r(e.minValue()-t,e.maxValue()+t)}var i=this.priceScale();return i&&i.isLog()&&e?new r(this.priceScale().priceToLogical(e.minValue()),this.priceScale().priceToLogical(e.maxValue())):e},pe.prototype.paneViews=function(){return this.isSourceHidden()?null:this._paneViews},pe.prototype.labelPaneViews=function(){return this.isSourceHidden()?null:this._labelPaneViews},pe.prototype.dataWindowView=function(){return this._dataWindowView},pe.prototype.legendView=function(){return this._legendView},pe.prototype.statusView=function(){return this._statusView},pe.prototype.priceAxisViews=function(e,t){return this.properties().oldShowLastValue&&!this.properties().oldShowLastValue.value()?null:e.findTargetPriceAxisViews(this,t,this._priceAxisViews,this._priceLinesAxisViews)},pe.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showStudyLastValue.value()},pe.prototype.isLinePlot=function(e){var t=this._metaInfo.plots[e];return $.isLinePlot(t)},pe.prototype.isSelfColorerPlot=function(e){var t=this._metaInfo.plots[e];return $.isColorerPlot(t)},
|
||||
pe.prototype.isTextColorerPlot=function(e){var t=this._metaInfo.plots[e];return $.isTextColorerPlot(t)},pe.prototype.isBarColorerPlot=function(e){var t=this._metaInfo.plots[e];return $.isBarColorerPlot(t)},pe.prototype.isBgColorerPlot=function(e){var t=this._metaInfo.plots[e];return $.isBgColorerPlot(t)},pe.prototype.isPlotShapesPlot=function(e){var t=this._metaInfo.plots[e];return $.isShapesPlot(t)},pe.prototype.isPlotCharsPlot=function(e){var t=this._metaInfo.plots[e];return $.isCharsPlot(t)},pe.prototype.isPlotArrowsPlot=function(e){var t=this._metaInfo.plots[e];return $.isArrowsPlot(t)},pe.prototype.isOHLCBarsPlot=function(e){var t=this._metaInfo.plots[e].target,i=this.metaInfo().defaults.ohlcPlots[t];return i&&this.isOHLCSeriesPlot(e)&&$.isOhlcPlotStyleBars(i)},pe.prototype.isOHLCCandlesPlot=function(e){var t=this._metaInfo.plots[e].target,i=this.metaInfo().defaults.ohlcPlots[t];return i&&this.isOHLCSeriesPlot(e)&&$.isOhlcPlotStyleCandles(i)},pe.prototype.isOHLCSeriesPlot=function(e){var t=this._metaInfo.plots[e];return $.isOhlcPlot(t)},pe.prototype.isOHLCOpenPlot=function(e){var t=this._metaInfo.plots[e];return $.isOhlcOpenPlot(t)},pe.prototype.isOHLCHighPlot=function(e){var t=this._metaInfo.plots[e];return $.isOhlcHighPlot(t)},pe.prototype.isOHLCLowPlot=function(e){var t=this._metaInfo.plots[e];return $.isOhlcLowPlot(t)},pe.prototype.isOHLCClosePlot=function(e){var t=this._metaInfo.plots[e];return $.isOhlcClosePlot(t)},pe.prototype.isOHLCColorerPlot=function(e){var t=this._metaInfo.plots[e];return $.isOhlcColorerPlot(t)},pe.prototype.isDataOffsetPlot=function(e){var t=this._metaInfo.plots[e];return $.isDataOffsetPlot(t)},pe.prototype.isAlertConditionPlot=function(e){var t=this._metaInfo.plots[e];return $.isAlertConditionPlot(t)},pe.prototype.hasBarColorer=function(){for(var e=0;e<this._metaInfo.plots.length;++e)if(this.isBarColorerPlot(e))return!0;return!1},pe.prototype.barColorer=function(){for(var e=null,t=0;t<this._metaInfo.plots.length;++t)if(this.isBarColorerPlot(t)){var i=new c(this,t);null==e?e=i:e.pushBackBarColorer(i)}if(null==e)throw new Error("Cannot create BarColorer: study doesn't have a bar_colorer plot!");return e},pe.prototype.base=function(){return 0},pe.prototype._priceScaleByProperties=function(){if("default"===this.properties().precision.value())return null;var e=parseInt(this.properties().precision.value());return isFinite(e)?Math.pow(10,e):null},pe.prototype._formatterByProperties=function(){var e=this._priceScaleByProperties();return null!==e?new H(e):null},pe.prototype._priceScaleByMetaInfo=function(){var e=this.metaInfo().format,t=isNumber(e.precision)?Math.pow(10,e.precision):void 0;if("price"===e.type||"percent"===e.type)return t||100;if("volume"===e.type){if(void 0===e.precision){var i=this.series().symbolInfo();if(null!==i&&isNumber(i.volume_precision))return Math.pow(10,i.volume_precision)}return 1}return"inherit"===e.type||le.logWarn("Unsupported format type: "+e.type),null},pe.prototype._formatterByMetaInfo=function(){
|
||||
var e=this.metaInfo().format,t=isNumber(e.precision)?Math.pow(10,e.precision):void 0;switch(e.type){case"price":return new H(t);case"volume":var i=e.precision;if(void 0===i){var n=this.series().symbolInfo();i=n&&isNumber(n.volume_precision)?n.volume_precision:0}return new z(i);case"percent":return new G(t);case"inherit":return null;default:return le.logWarn("Unsupported format type: "+e.type),null}},pe.prototype._onSourceFormatterChanged=function(){null===this._formatter&&(null!==this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire())},pe.prototype._onSourcePriceStepChanged=function(){null===this._priceStep&&this._priceStepChanged.fire()},pe.prototype._precisionChanged=function(){this._recreatePriceFormattingDependencies()},pe.prototype._recreatePriceFormattingDependencies=function(){this._recreateFormatter(),this._recreatePriceStep()},pe.prototype._recreateFormatter=function(){this._formatter=this._tryCreateFormatter(),this._formatterChanged.fire(),null!==this.priceScale()&&this.priceScale().updateFormatter(),this._model.fullUpdate()},pe.prototype._recreatePriceStep=function(){var e=null,t=this._tryToGetPriceScale();null!==t&&(e=1/t),this._priceStep!==e&&(this._priceStep=e,this._priceStepChanged.fire())},pe.prototype._tryToGetPriceScale=function(){var e=this._priceScaleByProperties();return null===e&&(e=this._priceScaleByMetaInfo()),e},pe.prototype._tryCreateFormatter=function(){var e=this._formatterByProperties();return null===e&&(e=this._formatterByMetaInfo()),e},pe.prototype.formatter=function(){return this._formatter||this.parentSource().formatter(!1)},pe.prototype.priceStep=function(){return this._priceStep||this.parentSource().priceStep(!1)},pe.prototype.setOwnerSource=function(e){ae.prototype.setOwnerSource.call(this,e),this._recreatePriceFormattingDependencies()},pe.prototype.nearestIndex=function(e,t,i){if(TradingView.isInteger(e)){var n=this.data().search(e,t,i);return null!==n?n.index:void 0}le.logDebug("nearestIndex: incorrect logicalPoint")},pe.prototype._lastNonEmptyPlotRow=function(e){if(!TradingView.isInteger(e))return le.logDebug("_lastNonEmptyPlotRow: incorrect plotIndex"),null;if(void 0!==this._lastNonEmptyPlotRowCache[e])return this._lastNonEmptyPlotRowCache[e];var t=this.data().findLast((function(t,i){return void 0!==i[e]}),1e3);return null===t?null:(this._lastNonEmptyPlotRowCache[e]=t,this._lastNonEmptyPlotRowCache[e])},pe.prototype.updateAllViews=function(){for(var e=0;e<this._paneViews.length;e++)this._paneViews[e].update();for(e=0;e<this._labelPaneViews.length;e++)this._labelPaneViews[e].update();this._dataWindowView.update(),null!==this._legendView&&this._legendView.update(),this._statusView.update();for(e=0;e<this._priceAxisViews.length;e++)this._priceAxisViews[e].update();this._priceLinesAxisViews.forEach((function(e){e.update()}))},pe.prototype.tags=function(){
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"description": "CL v19.032 (internal id f74f1ddb @ 2021-06-23T10:12:11.092Z)",
|
||||
"description": "CL v19.033 (internal id 6e7d81de @ 2021-06-29T12:46:50.041Z)",
|
||||
"type": "module",
|
||||
"main": "charting_library.cjs.js",
|
||||
"module": "charting_library.esm.js",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user