@pipsend/charts 2.3.16 → 2.3.17
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.
- package/dist/pipsend-charts.development.mjs +48 -9
- package/dist/pipsend-charts.production.mjs +2 -2
- package/dist/pipsend-charts.standalone.development.js +48 -9
- package/dist/pipsend-charts.standalone.development.mjs +48 -9
- package/dist/pipsend-charts.standalone.production.js +2 -2
- package/dist/pipsend-charts.standalone.production.mjs +2 -2
- package/dist/typings.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license
|
|
3
|
-
* Pipsend Charts v2.3.
|
|
3
|
+
* Pipsend Charts v2.3.17-dev+202610130113
|
|
4
4
|
* Copyright (c) 2026 Pipsend
|
|
5
5
|
* Licensed under MIT License
|
|
6
6
|
* Built on TradingView Lightweight Charts™ (Apache 2.0)
|
|
@@ -20216,8 +20216,11 @@ class PositionLineLabelLayout {
|
|
|
20216
20216
|
* move — which is invisible, and cheaper than forcing a second pass.
|
|
20217
20217
|
*/
|
|
20218
20218
|
_internal_setClaims(ownerId, claims) {
|
|
20219
|
+
const previous = this._private__claims.get(ownerId);
|
|
20219
20220
|
this._private__claims.set(ownerId, claims);
|
|
20220
|
-
|
|
20221
|
+
if (previous === undefined || !sameClaims(previous, claims)) {
|
|
20222
|
+
this._private__invalidated = true;
|
|
20223
|
+
}
|
|
20221
20224
|
}
|
|
20222
20225
|
/** How far down a label has to move to clear the ones already placed. */
|
|
20223
20226
|
_internal_offsetFor(ownerId, level) {
|
|
@@ -20238,7 +20241,10 @@ class PositionLineLabelLayout {
|
|
|
20238
20241
|
// them only need the few pixels they are short of — stepping by a
|
|
20239
20242
|
// full gap each time is what made the fan look flung open.
|
|
20240
20243
|
let y = claim._internal_y;
|
|
20241
|
-
for (const other of
|
|
20244
|
+
for (const other of placed) {
|
|
20245
|
+
if (other._internal_y >= y + gap) {
|
|
20246
|
+
break;
|
|
20247
|
+
}
|
|
20242
20248
|
if (Math.abs(y - other._internal_y) < gap) {
|
|
20243
20249
|
y = other._internal_y + gap;
|
|
20244
20250
|
}
|
|
@@ -20249,7 +20255,7 @@ class PositionLineLabelLayout {
|
|
|
20249
20255
|
// no worse than before and keeps the pile from running off.
|
|
20250
20256
|
offset = 0;
|
|
20251
20257
|
}
|
|
20252
|
-
placed
|
|
20258
|
+
insertByY(placed, { _internal_y: claim._internal_y + offset, _internal_height: claim._internal_height });
|
|
20253
20259
|
offsets.set(key(ownerId, claim._internal_level), offset);
|
|
20254
20260
|
}
|
|
20255
20261
|
}
|
|
@@ -20267,8 +20273,30 @@ function key(ownerId, level) {
|
|
|
20267
20273
|
function minGap(height) {
|
|
20268
20274
|
return Math.max(9, Math.round(height * 0.4));
|
|
20269
20275
|
}
|
|
20270
|
-
function
|
|
20271
|
-
|
|
20276
|
+
function insertByY(placed, claim) {
|
|
20277
|
+
let low = 0;
|
|
20278
|
+
let high = placed.length;
|
|
20279
|
+
while (low < high) {
|
|
20280
|
+
const middle = (low + high) >> 1;
|
|
20281
|
+
if (placed[middle]._internal_y <= claim._internal_y) {
|
|
20282
|
+
low = middle + 1;
|
|
20283
|
+
}
|
|
20284
|
+
else {
|
|
20285
|
+
high = middle;
|
|
20286
|
+
}
|
|
20287
|
+
}
|
|
20288
|
+
placed.splice(low, 0, claim);
|
|
20289
|
+
}
|
|
20290
|
+
function sameClaims(a, b) {
|
|
20291
|
+
if (a.length !== b.length) {
|
|
20292
|
+
return false;
|
|
20293
|
+
}
|
|
20294
|
+
for (let i = 0; i < a.length; i++) {
|
|
20295
|
+
if (a[i]._internal_level !== b[i]._internal_level || a[i]._internal_y !== b[i]._internal_y || a[i]._internal_height !== b[i]._internal_height) {
|
|
20296
|
+
return false;
|
|
20297
|
+
}
|
|
20298
|
+
}
|
|
20299
|
+
return true;
|
|
20272
20300
|
}
|
|
20273
20301
|
const layouts = new WeakMap();
|
|
20274
20302
|
/** The layout is shared by every position line on the same chart. */
|
|
@@ -20623,6 +20651,7 @@ class PositionLine {
|
|
|
20623
20651
|
constructor(chart, series, options) {
|
|
20624
20652
|
this._private__paneView = new PositionLinePaneView();
|
|
20625
20653
|
this._private__colorParser = new ColorParser([]);
|
|
20654
|
+
this._private__axisLabels = new Map();
|
|
20626
20655
|
this._private__attached = false;
|
|
20627
20656
|
this._private__hoveredLevel = null;
|
|
20628
20657
|
this._private__hoveredPart = null;
|
|
@@ -20914,12 +20943,22 @@ class PositionLine {
|
|
|
20914
20943
|
return null;
|
|
20915
20944
|
}
|
|
20916
20945
|
const color = options.color ?? positionLineDefaultColors[level];
|
|
20917
|
-
|
|
20946
|
+
const formatter = this._private__series.priceFormatter();
|
|
20947
|
+
const cached = this._private__axisLabels.get(level);
|
|
20948
|
+
if (cached !== undefined && cached._internal_price === options.price && cached._internal_color === color && cached._internal_formatter === formatter) {
|
|
20949
|
+
if (cached._internal_label._internal_coordinate !== y) {
|
|
20950
|
+
cached._internal_label = { ...cached._internal_label, _internal_coordinate: y };
|
|
20951
|
+
}
|
|
20952
|
+
return cached._internal_label;
|
|
20953
|
+
}
|
|
20954
|
+
const label = {
|
|
20918
20955
|
_internal_coordinate: y,
|
|
20919
|
-
_internal_text:
|
|
20956
|
+
_internal_text: formatter.format(options.price),
|
|
20920
20957
|
_internal_color: color,
|
|
20921
20958
|
_internal_textColor: this._private__colorParser._internal_generateContrastColors(color)._internal_foreground,
|
|
20922
20959
|
};
|
|
20960
|
+
this._private__axisLabels.set(level, { _internal_price: options.price, _internal_color: color, _internal_formatter: formatter, _internal_label: label });
|
|
20961
|
+
return label;
|
|
20923
20962
|
}
|
|
20924
20963
|
_private__levelOptions(level) {
|
|
20925
20964
|
const options = level === 'entry' ? this._private__options.entry : this._private__options[level];
|
|
@@ -31050,7 +31089,7 @@ const customSeriesDefaultOptions = {
|
|
|
31050
31089
|
* Returns the current version as a string. For example `'1.0.0'`.
|
|
31051
31090
|
*/
|
|
31052
31091
|
function version() {
|
|
31053
|
-
return "2.3.
|
|
31092
|
+
return "2.3.17-dev+202610130113";
|
|
31054
31093
|
}
|
|
31055
31094
|
|
|
31056
31095
|
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 };
|