@pipsend/charts 2.3.14 → 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.14
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)
@@ -4575,18 +4575,16 @@
4575
4575
  this._private__invalidateInternalHeightCache();
4576
4576
  }
4577
4577
  if (priceRange !== null) {
4578
- // keep current range is new is empty
4579
- if (priceRange._internal_minValue() === priceRange._internal_maxValue()) {
4580
- // if price range is degenerated to 1 point let's extend it by 10 min move values
4581
- // to avoid incorrect range and empty (blank) scale (in case of min tick much greater than 1)
4582
- const extendValue = 5 * this._internal_minMove();
4583
- if (this._internal_isLog()) {
4584
- priceRange = convertPriceRangeFromLog(priceRange, this._private__logFormula);
4585
- }
4586
- priceRange = new PriceRangeImpl(priceRange._internal_minValue() - extendValue, priceRange._internal_maxValue() + extendValue);
4587
- if (this._internal_isLog()) {
4588
- priceRange = convertPriceRangeToLog(priceRange, this._private__logFormula);
4589
- }
4578
+ // a range flat or narrower than 10 min moves leaves room for one tick mark at most,
4579
+ // so widen it around its center to keep a readable scale
4580
+ const isLog = this._internal_isLog();
4581
+ const rawRange = isLog ? convertPriceRangeFromLog(priceRange, this._private__logFormula) : priceRange;
4582
+ const minimumLength = this._internal_isPercentage() || this._internal_isIndexedTo100() ? 0 : 10 * this._internal_minMove();
4583
+ if (rawRange._internal_minValue() === rawRange._internal_maxValue() || rawRange._internal_length() < minimumLength) {
4584
+ const extendValue = Math.max(5 * this._internal_minMove(), minimumLength / 2);
4585
+ const center = (rawRange._internal_minValue() + rawRange._internal_maxValue()) / 2;
4586
+ const widened = new PriceRangeImpl(center - extendValue, center + extendValue);
4587
+ priceRange = isLog ? convertPriceRangeToLog(widened, this._private__logFormula) : widened;
4590
4588
  }
4591
4589
  if (this._internal_isLog()) {
4592
4590
  const rawRange = convertPriceRangeFromLog(priceRange, this._private__logFormula);
@@ -14687,6 +14685,9 @@
14687
14685
  function shapeMargin(barSpacing) {
14688
14686
  return Math.max(size(barSpacing, 0.1), 3 /* Constants.MinShapeMargin */);
14689
14687
  }
14688
+ function barGap(barSpacing) {
14689
+ return Math.max(shapeMargin(barSpacing), 10 /* Constants.MinBarGap */);
14690
+ }
14690
14691
  function calculateAdjustedMargin(margin, hasSide, hasInBar) {
14691
14692
  if (hasSide) {
14692
14693
  return margin;
@@ -15313,17 +15314,18 @@
15313
15314
  }
15314
15315
  let prevTimeIndex = NaN;
15315
15316
  const shapeMargin$1 = shapeMargin(timeScale.options().barSpacing);
15317
+ const barGap$1 = barGap(timeScale.options().barSpacing);
15316
15318
  const offsets = {
15317
- _internal_aboveBar: shapeMargin$1,
15318
- _internal_belowBar: shapeMargin$1,
15319
+ _internal_aboveBar: barGap$1,
15320
+ _internal_belowBar: barGap$1,
15319
15321
  };
15320
15322
  this._private__data._internal_visibleRange = visibleTimedValues(this._private__data._internal_items, visibleBarsRange, true);
15321
15323
  for (let index = this._private__data._internal_visibleRange.from; index < this._private__data._internal_visibleRange.to; index++) {
15322
15324
  const marker = seriesMarkers[index];
15323
15325
  if (marker.time !== prevTimeIndex) {
15324
15326
  // new bar, reset stack counter
15325
- offsets._internal_aboveBar = shapeMargin$1;
15326
- offsets._internal_belowBar = shapeMargin$1;
15327
+ offsets._internal_aboveBar = barGap$1;
15328
+ offsets._internal_belowBar = barGap$1;
15327
15329
  prevTimeIndex = marker.time;
15328
15330
  }
15329
15331
  const rendererItem = this._private__data._internal_items[index];
@@ -15440,7 +15442,7 @@
15440
15442
  this._private__cachedBarSpacing = barSpacing;
15441
15443
  if (this._private__markers.length > 0) {
15442
15444
  const shapeMargin$1 = shapeMargin(barSpacing);
15443
- const marginValue = calculateShapeHeight(barSpacing) * 1.5 + shapeMargin$1 * 2;
15445
+ const marginValue = calculateShapeHeight(barSpacing) * 1.5 + shapeMargin$1 + barGap(barSpacing);
15444
15446
  const positions = this._private__getMarkerPositions();
15445
15447
  this._private__autoScaleMargins = {
15446
15448
  above: calculateAdjustedMargin(marginValue, positions.aboveBar, positions.inBar),
@@ -17943,10 +17945,13 @@
17943
17945
  const blankSource = (blank) => {
17944
17946
  if (blank && restoreSourcePaint === null) {
17945
17947
  restoreSourcePaint = hideSeriesPaint(series);
17948
+ // Under the blank source, so what hangs off it draws over the candles.
17949
+ haSeries.setSeriesOrder(series.seriesOrder());
17946
17950
  }
17947
17951
  else if (!blank && restoreSourcePaint !== null) {
17948
17952
  restoreSourcePaint();
17949
17953
  restoreSourcePaint = null;
17954
+ haSeries.setSeriesOrder(series.seriesOrder() + 1);
17950
17955
  }
17951
17956
  };
17952
17957
  const runtime = bindIndicator({
@@ -17975,8 +17980,9 @@
17975
17980
  blankSource(current.hideSource === true);
17976
17981
  },
17977
17982
  });
17978
- const handle = {
17979
- _internal_series: haSeries,
17983
+ // Returned as a literal: a local annotation would let the property renamer mangle `series`.
17984
+ return {
17985
+ series: haSeries,
17980
17986
  options: runtime.options,
17981
17987
  applyOptions: runtime.applyOptions,
17982
17988
  recalculate: runtime.recalculate,
@@ -17992,7 +17998,6 @@
17992
17998
  }
17993
17999
  },
17994
18000
  };
17995
- return handle;
17996
18001
  }
17997
18002
 
17998
18003
  /**
@@ -31441,7 +31446,7 @@
31441
31446
  * Returns the current version as a string. For example `'1.0.0'`.
31442
31447
  */
31443
31448
  function version() {
31444
- return "2.3.14";
31449
+ return "2.3.16-dev+202610080459";
31445
31450
  }
31446
31451
 
31447
31452
  var PipsendChartsModule = /*#__PURE__*/Object.freeze({
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @license
3
- * Pipsend Charts v2.3.14
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)
@@ -4572,18 +4572,16 @@ class PriceScale {
4572
4572
  this._private__invalidateInternalHeightCache();
4573
4573
  }
4574
4574
  if (priceRange !== null) {
4575
- // keep current range is new is empty
4576
- if (priceRange._internal_minValue() === priceRange._internal_maxValue()) {
4577
- // if price range is degenerated to 1 point let's extend it by 10 min move values
4578
- // to avoid incorrect range and empty (blank) scale (in case of min tick much greater than 1)
4579
- const extendValue = 5 * this._internal_minMove();
4580
- if (this._internal_isLog()) {
4581
- priceRange = convertPriceRangeFromLog(priceRange, this._private__logFormula);
4582
- }
4583
- priceRange = new PriceRangeImpl(priceRange._internal_minValue() - extendValue, priceRange._internal_maxValue() + extendValue);
4584
- if (this._internal_isLog()) {
4585
- priceRange = convertPriceRangeToLog(priceRange, this._private__logFormula);
4586
- }
4575
+ // a range flat or narrower than 10 min moves leaves room for one tick mark at most,
4576
+ // so widen it around its center to keep a readable scale
4577
+ const isLog = this._internal_isLog();
4578
+ const rawRange = isLog ? convertPriceRangeFromLog(priceRange, this._private__logFormula) : priceRange;
4579
+ const minimumLength = this._internal_isPercentage() || this._internal_isIndexedTo100() ? 0 : 10 * this._internal_minMove();
4580
+ if (rawRange._internal_minValue() === rawRange._internal_maxValue() || rawRange._internal_length() < minimumLength) {
4581
+ const extendValue = Math.max(5 * this._internal_minMove(), minimumLength / 2);
4582
+ const center = (rawRange._internal_minValue() + rawRange._internal_maxValue()) / 2;
4583
+ const widened = new PriceRangeImpl(center - extendValue, center + extendValue);
4584
+ priceRange = isLog ? convertPriceRangeToLog(widened, this._private__logFormula) : widened;
4587
4585
  }
4588
4586
  if (this._internal_isLog()) {
4589
4587
  const rawRange = convertPriceRangeFromLog(priceRange, this._private__logFormula);
@@ -14684,6 +14682,9 @@ function calculateShapeHeight(barSpacing) {
14684
14682
  function shapeMargin(barSpacing) {
14685
14683
  return Math.max(size(barSpacing, 0.1), 3 /* Constants.MinShapeMargin */);
14686
14684
  }
14685
+ function barGap(barSpacing) {
14686
+ return Math.max(shapeMargin(barSpacing), 10 /* Constants.MinBarGap */);
14687
+ }
14687
14688
  function calculateAdjustedMargin(margin, hasSide, hasInBar) {
14688
14689
  if (hasSide) {
14689
14690
  return margin;
@@ -15310,17 +15311,18 @@ class SeriesMarkersPaneView {
15310
15311
  }
15311
15312
  let prevTimeIndex = NaN;
15312
15313
  const shapeMargin$1 = shapeMargin(timeScale.options().barSpacing);
15314
+ const barGap$1 = barGap(timeScale.options().barSpacing);
15313
15315
  const offsets = {
15314
- _internal_aboveBar: shapeMargin$1,
15315
- _internal_belowBar: shapeMargin$1,
15316
+ _internal_aboveBar: barGap$1,
15317
+ _internal_belowBar: barGap$1,
15316
15318
  };
15317
15319
  this._private__data._internal_visibleRange = visibleTimedValues(this._private__data._internal_items, visibleBarsRange, true);
15318
15320
  for (let index = this._private__data._internal_visibleRange.from; index < this._private__data._internal_visibleRange.to; index++) {
15319
15321
  const marker = seriesMarkers[index];
15320
15322
  if (marker.time !== prevTimeIndex) {
15321
15323
  // new bar, reset stack counter
15322
- offsets._internal_aboveBar = shapeMargin$1;
15323
- offsets._internal_belowBar = shapeMargin$1;
15324
+ offsets._internal_aboveBar = barGap$1;
15325
+ offsets._internal_belowBar = barGap$1;
15324
15326
  prevTimeIndex = marker.time;
15325
15327
  }
15326
15328
  const rendererItem = this._private__data._internal_items[index];
@@ -15437,7 +15439,7 @@ class SeriesMarkersPrimitive {
15437
15439
  this._private__cachedBarSpacing = barSpacing;
15438
15440
  if (this._private__markers.length > 0) {
15439
15441
  const shapeMargin$1 = shapeMargin(barSpacing);
15440
- const marginValue = calculateShapeHeight(barSpacing) * 1.5 + shapeMargin$1 * 2;
15442
+ const marginValue = calculateShapeHeight(barSpacing) * 1.5 + shapeMargin$1 + barGap(barSpacing);
15441
15443
  const positions = this._private__getMarkerPositions();
15442
15444
  this._private__autoScaleMargins = {
15443
15445
  above: calculateAdjustedMargin(marginValue, positions.aboveBar, positions.inBar),
@@ -17940,10 +17942,13 @@ function applyHeikinAshi(series, chart, options = {}) {
17940
17942
  const blankSource = (blank) => {
17941
17943
  if (blank && restoreSourcePaint === null) {
17942
17944
  restoreSourcePaint = hideSeriesPaint(series);
17945
+ // Under the blank source, so what hangs off it draws over the candles.
17946
+ haSeries.setSeriesOrder(series.seriesOrder());
17943
17947
  }
17944
17948
  else if (!blank && restoreSourcePaint !== null) {
17945
17949
  restoreSourcePaint();
17946
17950
  restoreSourcePaint = null;
17951
+ haSeries.setSeriesOrder(series.seriesOrder() + 1);
17947
17952
  }
17948
17953
  };
17949
17954
  const runtime = bindIndicator({
@@ -17972,8 +17977,9 @@ function applyHeikinAshi(series, chart, options = {}) {
17972
17977
  blankSource(current.hideSource === true);
17973
17978
  },
17974
17979
  });
17975
- const handle = {
17976
- _internal_series: haSeries,
17980
+ // Returned as a literal: a local annotation would let the property renamer mangle `series`.
17981
+ return {
17982
+ series: haSeries,
17977
17983
  options: runtime.options,
17978
17984
  applyOptions: runtime.applyOptions,
17979
17985
  recalculate: runtime.recalculate,
@@ -17989,7 +17995,6 @@ function applyHeikinAshi(series, chart, options = {}) {
17989
17995
  }
17990
17996
  },
17991
17997
  };
17992
- return handle;
17993
17998
  }
17994
17999
 
17995
18000
  /**
@@ -31438,7 +31443,7 @@ const customSeriesDefaultOptions = {
31438
31443
  * Returns the current version as a string. For example `'1.0.0'`.
31439
31444
  */
31440
31445
  function version() {
31441
- return "2.3.14";
31446
+ return "2.3.16-dev+202610080459";
31442
31447
  }
31443
31448
 
31444
31449
  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 };