hyperprop-charting-library 0.1.150 → 0.1.151

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.
@@ -7156,7 +7156,7 @@ function createChart(element, options = {}) {
7156
7156
  ctx.stroke();
7157
7157
  ctx.restore();
7158
7158
  }
7159
- const sessionSeparatorsOn = grid.sessionSeparators || compiledSession !== null && sessionOptions.separators !== false;
7159
+ const sessionSeparatorsOn = grid.sessionSeparators && sessionOptions.separators !== false;
7160
7160
  const intradaySeries = (() => {
7161
7161
  if (data.length < 2) return false;
7162
7162
  const probe = Math.min(Math.max(1, startIndex), data.length - 1);
@@ -1192,7 +1192,12 @@ type SessionPresetName = "cme-futures" | "cme-rth" | "us-equities" | "us-equitie
1192
1192
  interface SessionOptions {
1193
1193
  /** A preset name or your own spec. null disables session handling. */
1194
1194
  spec?: SessionSpec | SessionPresetName | null;
1195
- /** Vertical rule at each session start. Default true when a spec is set. */
1195
+ /**
1196
+ * Opt out of session-aware separators while keeping the spec for everything
1197
+ * else. Setting a spec never turns separators *on* by itself — that switch
1198
+ * is `grid.sessionSeparators`; the spec only moves the boundary from
1199
+ * calendar midnight to the real session open.
1200
+ */
1196
1201
  separators?: boolean;
1197
1202
  /**
1198
1203
  * Tint bars that fall outside the session (overnight/extended hours), the
@@ -7120,7 +7120,7 @@ function createChart(element, options = {}) {
7120
7120
  ctx.stroke();
7121
7121
  ctx.restore();
7122
7122
  }
7123
- const sessionSeparatorsOn = grid.sessionSeparators || compiledSession !== null && sessionOptions.separators !== false;
7123
+ const sessionSeparatorsOn = grid.sessionSeparators && sessionOptions.separators !== false;
7124
7124
  const intradaySeries = (() => {
7125
7125
  if (data.length < 2) return false;
7126
7126
  const probe = Math.min(Math.max(1, startIndex), data.length - 1);
package/dist/index.cjs CHANGED
@@ -7156,7 +7156,7 @@ function createChart(element, options = {}) {
7156
7156
  ctx.stroke();
7157
7157
  ctx.restore();
7158
7158
  }
7159
- const sessionSeparatorsOn = grid.sessionSeparators || compiledSession !== null && sessionOptions.separators !== false;
7159
+ const sessionSeparatorsOn = grid.sessionSeparators && sessionOptions.separators !== false;
7160
7160
  const intradaySeries = (() => {
7161
7161
  if (data.length < 2) return false;
7162
7162
  const probe = Math.min(Math.max(1, startIndex), data.length - 1);
package/dist/index.d.cts CHANGED
@@ -1192,7 +1192,12 @@ type SessionPresetName = "cme-futures" | "cme-rth" | "us-equities" | "us-equitie
1192
1192
  interface SessionOptions {
1193
1193
  /** A preset name or your own spec. null disables session handling. */
1194
1194
  spec?: SessionSpec | SessionPresetName | null;
1195
- /** Vertical rule at each session start. Default true when a spec is set. */
1195
+ /**
1196
+ * Opt out of session-aware separators while keeping the spec for everything
1197
+ * else. Setting a spec never turns separators *on* by itself — that switch
1198
+ * is `grid.sessionSeparators`; the spec only moves the boundary from
1199
+ * calendar midnight to the real session open.
1200
+ */
1196
1201
  separators?: boolean;
1197
1202
  /**
1198
1203
  * Tint bars that fall outside the session (overnight/extended hours), the
package/dist/index.d.ts CHANGED
@@ -1192,7 +1192,12 @@ type SessionPresetName = "cme-futures" | "cme-rth" | "us-equities" | "us-equitie
1192
1192
  interface SessionOptions {
1193
1193
  /** A preset name or your own spec. null disables session handling. */
1194
1194
  spec?: SessionSpec | SessionPresetName | null;
1195
- /** Vertical rule at each session start. Default true when a spec is set. */
1195
+ /**
1196
+ * Opt out of session-aware separators while keeping the spec for everything
1197
+ * else. Setting a spec never turns separators *on* by itself — that switch
1198
+ * is `grid.sessionSeparators`; the spec only moves the boundary from
1199
+ * calendar midnight to the real session open.
1200
+ */
1196
1201
  separators?: boolean;
1197
1202
  /**
1198
1203
  * Tint bars that fall outside the session (overnight/extended hours), the
package/dist/index.js CHANGED
@@ -7120,7 +7120,7 @@ function createChart(element, options = {}) {
7120
7120
  ctx.stroke();
7121
7121
  ctx.restore();
7122
7122
  }
7123
- const sessionSeparatorsOn = grid.sessionSeparators || compiledSession !== null && sessionOptions.separators !== false;
7123
+ const sessionSeparatorsOn = grid.sessionSeparators && sessionOptions.separators !== false;
7124
7124
  const intradaySeries = (() => {
7125
7125
  if (data.length < 2) return false;
7126
7126
  const probe = Math.min(Math.max(1, startIndex), data.length - 1);
package/docs/API.md CHANGED
@@ -881,6 +881,30 @@ they are not part of `saveState()`.
881
881
 
882
882
  ---
883
883
 
884
+ ## Multi-chart layouts
885
+
886
+ Several charts are just several `createChart` calls; what the library adds is
887
+ the piece hosts can't do themselves — mirroring one chart's crosshair onto the
888
+ others:
889
+
890
+ ```ts
891
+ primary.onCrosshairMove((event) => {
892
+ const ms = event.time ? Date.parse(event.time) : NaN;
893
+ const at = event.region === "plot" && Number.isFinite(ms) ? { timeMs: ms } : null;
894
+ for (const other of siblings) other.setExternalCrosshair(at);
895
+ });
896
+ ```
897
+
898
+ Mirrored crosshairs match by **timestamp**, not pixels, so charts on different
899
+ intervals — or different instruments — still line up, and the ghost line is
900
+ drawn dimmer than the chart's own. It is suppressed while that chart is the one
901
+ being hovered, so the two never fight.
902
+
903
+ Time-range sync needs nothing new: feed `onViewportChange` into the siblings'
904
+ `setViewport({ centerTimeMs, xSpan })`.
905
+
906
+ ---
907
+
884
908
  ## Overlay indicator legend
885
909
 
886
910
  With `labels.showIndicatorNames` / `showIndicatorValues`, overlay indicators
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperprop-charting-library",
3
- "version": "0.1.150",
3
+ "version": "0.1.151",
4
4
  "description": "Lightweight TypeScript charting core",
5
5
  "type": "module",
6
6
  "main": "./dist/hyperprop-charting-library.cjs",