hyperprop-charting-library 0.1.78 → 0.1.80

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.
@@ -2429,25 +2429,6 @@ function createChart(element, options = {}) {
2429
2429
  ctx.fillStyle = lossFill;
2430
2430
  ctx.fillRect(boxX0, Math.min(entryY, stopY), boxW, Math.abs(stopY - entryY));
2431
2431
  ctx.restore();
2432
- const livePoint = data[data.length - 1];
2433
- if (livePoint) {
2434
- const tickerOpts2 = mergedOptions.tickerLine ?? DEFAULT_OPTIONS.tickerLine;
2435
- const livePrice = tickerOpts2.smoothing && smoothedTickerPrice !== null ? smoothedTickerPrice : livePoint.c;
2436
- const lo = Math.min(target.price, stop.price);
2437
- const hi = Math.max(target.price, stop.price);
2438
- const clampedLive = Math.min(hi, Math.max(lo, livePrice));
2439
- const dir = target.price - entry.price;
2440
- const moved = clampedLive - entry.price;
2441
- if (dir !== 0 && Math.abs(moved) > 0) {
2442
- const towardTarget = moved * dir > 0;
2443
- const liveY = yFromPrice(clampedLive);
2444
- ctx.save();
2445
- ctx.globalAlpha = draft ? 0.5 : 1;
2446
- ctx.fillStyle = hexToRgba(towardTarget ? profitColor : lossColor, 0.22);
2447
- ctx.fillRect(boxX0, Math.min(entryY, liveY), boxW, Math.abs(liveY - entryY));
2448
- ctx.restore();
2449
- }
2450
- }
2451
2432
  if (isSelected) {
2452
2433
  ctx.save();
2453
2434
  ctx.setLineDash([]);
@@ -2403,25 +2403,6 @@ function createChart(element, options = {}) {
2403
2403
  ctx.fillStyle = lossFill;
2404
2404
  ctx.fillRect(boxX0, Math.min(entryY, stopY), boxW, Math.abs(stopY - entryY));
2405
2405
  ctx.restore();
2406
- const livePoint = data[data.length - 1];
2407
- if (livePoint) {
2408
- const tickerOpts2 = mergedOptions.tickerLine ?? DEFAULT_OPTIONS.tickerLine;
2409
- const livePrice = tickerOpts2.smoothing && smoothedTickerPrice !== null ? smoothedTickerPrice : livePoint.c;
2410
- const lo = Math.min(target.price, stop.price);
2411
- const hi = Math.max(target.price, stop.price);
2412
- const clampedLive = Math.min(hi, Math.max(lo, livePrice));
2413
- const dir = target.price - entry.price;
2414
- const moved = clampedLive - entry.price;
2415
- if (dir !== 0 && Math.abs(moved) > 0) {
2416
- const towardTarget = moved * dir > 0;
2417
- const liveY = yFromPrice(clampedLive);
2418
- ctx.save();
2419
- ctx.globalAlpha = draft ? 0.5 : 1;
2420
- ctx.fillStyle = hexToRgba(towardTarget ? profitColor : lossColor, 0.22);
2421
- ctx.fillRect(boxX0, Math.min(entryY, liveY), boxW, Math.abs(liveY - entryY));
2422
- ctx.restore();
2423
- }
2424
- }
2425
2406
  if (isSelected) {
2426
2407
  ctx.save();
2427
2408
  ctx.setLineDash([]);
package/dist/index.cjs CHANGED
@@ -2429,25 +2429,6 @@ function createChart(element, options = {}) {
2429
2429
  ctx.fillStyle = lossFill;
2430
2430
  ctx.fillRect(boxX0, Math.min(entryY, stopY), boxW, Math.abs(stopY - entryY));
2431
2431
  ctx.restore();
2432
- const livePoint = data[data.length - 1];
2433
- if (livePoint) {
2434
- const tickerOpts2 = mergedOptions.tickerLine ?? DEFAULT_OPTIONS.tickerLine;
2435
- const livePrice = tickerOpts2.smoothing && smoothedTickerPrice !== null ? smoothedTickerPrice : livePoint.c;
2436
- const lo = Math.min(target.price, stop.price);
2437
- const hi = Math.max(target.price, stop.price);
2438
- const clampedLive = Math.min(hi, Math.max(lo, livePrice));
2439
- const dir = target.price - entry.price;
2440
- const moved = clampedLive - entry.price;
2441
- if (dir !== 0 && Math.abs(moved) > 0) {
2442
- const towardTarget = moved * dir > 0;
2443
- const liveY = yFromPrice(clampedLive);
2444
- ctx.save();
2445
- ctx.globalAlpha = draft ? 0.5 : 1;
2446
- ctx.fillStyle = hexToRgba(towardTarget ? profitColor : lossColor, 0.22);
2447
- ctx.fillRect(boxX0, Math.min(entryY, liveY), boxW, Math.abs(liveY - entryY));
2448
- ctx.restore();
2449
- }
2450
- }
2451
2432
  if (isSelected) {
2452
2433
  ctx.save();
2453
2434
  ctx.setLineDash([]);
package/dist/index.js CHANGED
@@ -2403,25 +2403,6 @@ function createChart(element, options = {}) {
2403
2403
  ctx.fillStyle = lossFill;
2404
2404
  ctx.fillRect(boxX0, Math.min(entryY, stopY), boxW, Math.abs(stopY - entryY));
2405
2405
  ctx.restore();
2406
- const livePoint = data[data.length - 1];
2407
- if (livePoint) {
2408
- const tickerOpts2 = mergedOptions.tickerLine ?? DEFAULT_OPTIONS.tickerLine;
2409
- const livePrice = tickerOpts2.smoothing && smoothedTickerPrice !== null ? smoothedTickerPrice : livePoint.c;
2410
- const lo = Math.min(target.price, stop.price);
2411
- const hi = Math.max(target.price, stop.price);
2412
- const clampedLive = Math.min(hi, Math.max(lo, livePrice));
2413
- const dir = target.price - entry.price;
2414
- const moved = clampedLive - entry.price;
2415
- if (dir !== 0 && Math.abs(moved) > 0) {
2416
- const towardTarget = moved * dir > 0;
2417
- const liveY = yFromPrice(clampedLive);
2418
- ctx.save();
2419
- ctx.globalAlpha = draft ? 0.5 : 1;
2420
- ctx.fillStyle = hexToRgba(towardTarget ? profitColor : lossColor, 0.22);
2421
- ctx.fillRect(boxX0, Math.min(entryY, liveY), boxW, Math.abs(liveY - entryY));
2422
- ctx.restore();
2423
- }
2424
- }
2425
2406
  if (isSelected) {
2426
2407
  ctx.save();
2427
2408
  ctx.setLineDash([]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperprop-charting-library",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "description": "Lightweight TypeScript charting core",
5
5
  "type": "module",
6
6
  "main": "./dist/hyperprop-charting-library.cjs",