@pipsend/charts 2.3.15 → 2.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @license
3
- * Pipsend Charts v2.3.15
3
+ * Pipsend Charts v2.3.16-dev+202610080459
4
4
  * Copyright (c) 2026 Pipsend
5
5
  * Licensed under MIT License
6
6
  * Built on TradingView Lightweight Charts™ (Apache 2.0)
@@ -4574,18 +4574,16 @@ class PriceScale {
4574
4574
  this._private__invalidateInternalHeightCache();
4575
4575
  }
4576
4576
  if (priceRange !== null) {
4577
- // keep current range is new is empty
4578
- if (priceRange._internal_minValue() === priceRange._internal_maxValue()) {
4579
- // if price range is degenerated to 1 point let's extend it by 10 min move values
4580
- // to avoid incorrect range and empty (blank) scale (in case of min tick much greater than 1)
4581
- const extendValue = 5 * this._internal_minMove();
4582
- if (this._internal_isLog()) {
4583
- priceRange = convertPriceRangeFromLog(priceRange, this._private__logFormula);
4584
- }
4585
- priceRange = new PriceRangeImpl(priceRange._internal_minValue() - extendValue, priceRange._internal_maxValue() + extendValue);
4586
- if (this._internal_isLog()) {
4587
- priceRange = convertPriceRangeToLog(priceRange, this._private__logFormula);
4588
- }
4577
+ // a range flat or narrower than 10 min moves leaves room for one tick mark at most,
4578
+ // so widen it around its center to keep a readable scale
4579
+ const isLog = this._internal_isLog();
4580
+ const rawRange = isLog ? convertPriceRangeFromLog(priceRange, this._private__logFormula) : priceRange;
4581
+ const minimumLength = this._internal_isPercentage() || this._internal_isIndexedTo100() ? 0 : 10 * this._internal_minMove();
4582
+ if (rawRange._internal_minValue() === rawRange._internal_maxValue() || rawRange._internal_length() < minimumLength) {
4583
+ const extendValue = Math.max(5 * this._internal_minMove(), minimumLength / 2);
4584
+ const center = (rawRange._internal_minValue() + rawRange._internal_maxValue()) / 2;
4585
+ const widened = new PriceRangeImpl(center - extendValue, center + extendValue);
4586
+ priceRange = isLog ? convertPriceRangeToLog(widened, this._private__logFormula) : widened;
4589
4587
  }
4590
4588
  if (this._internal_isLog()) {
4591
4589
  const rawRange = convertPriceRangeFromLog(priceRange, this._private__logFormula);
@@ -31052,7 +31050,7 @@ const customSeriesDefaultOptions = {
31052
31050
  * Returns the current version as a string. For example `'1.0.0'`.
31053
31051
  */
31054
31052
  function version() {
31055
- return "2.3.15";
31053
+ return "2.3.16-dev+202610080459";
31056
31054
  }
31057
31055
 
31058
31056
  export { areaSeries as AreaSeries, ArrowTool, barSeries as BarSeries, baselineSeries as BaselineSeries, BrushTool, candlestickSeries as CandlestickSeries, CircleTool, ColorType, CrossLineTool, CrosshairMode, DEFAULT_SESSIONS, DraggablePriceLine, DrawingToolsManager, EXTENDED_FIBONACCI_RATIOS, FibonacciCalculator, FibonacciExtensionTool, FibonacciFanTool, FibonacciTool, GanttTool, histogramSeries as HistogramSeries, HorizontalLineTool, InteractiveLineManager, LastPriceAnimationMode, lineSeries as LineSeries, LineStyle, LineType, MismatchDirection, ParallelChannelTool, PitchforkTool, PolygonTool, PositionCalculator, PositionLine, PositionMarkersManager, PositionTool, PriceLineSource, PriceScaleMode, RectangleTool, RulerCalculator, RulerTool, STANDARD_FIBONACCI_RATIOS, TextTool, TickMarkType, TrackingModeExitMode, TradingSessionsIndicator, TrendLineTool, VerticalLineTool, VolumeProfileIndicator, applyADX, applyATR, applyBollingerBands, applyCCI, applyDonchianChannels, applyEMA, applyHeikinAshi, applyIchimoku, applyKeltnerChannels, applyMACD, applyMFI, applyOBV, applyParabolicSAR, applyPivotPoints, applyRSI, applySMA, applyStochastic, applySuperTrend, applyVWAP, applyVolume, applyWMA, applyWilliamsR, calculateHeikinAshi, calculatePipConfig, coordinateFromTime, createArrowTool, createBrushTool, createChart, createChartEx, createCircleTool, createCrossLineTool, createFibonacciExtensionTool, createFibonacciFanTool, createFibonacciTool, createGanttTool, createHorizontalLineTool, createImageWatermark, createInteractiveLineManager, createOptionsChart, createParallelChannelTool, createPitchforkTool, createPolygonTool, createPositionLine, createPositionMarkers, createPositionTool, createRectangleTool, createRulerTool, createSeriesMarkers, createTextTool, createTextWatermark, createTradingLine, createTradingSessionsIndicator, createTrendLineTool, createUpDownMarkers, createVerticalLineTool, createVolumeProfileIndicator, createYieldCurveChart, customSeriesDefaultOptions, defaultHorzScaleBehavior, getPipConfig, hideSeriesPaint, isBusinessDay, isUTCTimestamp, setSeriesVolumes, setVolumeProfileData, timeFromCoordinate, version };