scichart-engine 1.5.0 → 1.5.1

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.
Files changed (55) hide show
  1. package/dist/core/ChartControls.d.ts +10 -1
  2. package/dist/core/ChartLegend.d.ts +6 -0
  3. package/dist/core/chart/ChartCore.d.ts +6 -0
  4. package/dist/core/chart/ChartUI.d.ts +4 -0
  5. package/dist/core/chart/types.d.ts +3 -0
  6. package/dist/core/responsive/ResponsiveManager.d.ts +2 -1
  7. package/dist/{index-CyhxCboy.js → index-Btz_voey.js} +18 -27
  8. package/dist/index-Btz_voey.js.map +1 -0
  9. package/dist/{index-CaR-Pz6U.js → index-Clf95QXk.js} +81 -38
  10. package/dist/index-Clf95QXk.js.map +1 -0
  11. package/dist/{index-tr5uSRKi.js → index-IRhlzXlI.js} +1 -2
  12. package/dist/{index-tr5uSRKi.js.map → index-IRhlzXlI.js.map} +1 -1
  13. package/dist/{index.core-D8VXllsr.js → index.core-DRVElg9n.js} +795 -558
  14. package/dist/index.core-DRVElg9n.js.map +1 -0
  15. package/dist/index.d.ts +2 -2
  16. package/dist/plugins/3d.js +1 -3
  17. package/dist/plugins/3d.js.map +1 -1
  18. package/dist/plugins/analysis.js +473 -454
  19. package/dist/plugins/analysis.js.map +1 -1
  20. package/dist/plugins/annotations.js +33 -33
  21. package/dist/plugins/annotations.js.map +1 -1
  22. package/dist/plugins/clipboard.js +9 -11
  23. package/dist/plugins/clipboard.js.map +1 -1
  24. package/dist/plugins/debug.js +43 -43
  25. package/dist/plugins/debug.js.map +1 -1
  26. package/dist/plugins/gpu.js +15 -17
  27. package/dist/plugins/gpu.js.map +1 -1
  28. package/dist/plugins/i18n.js +19 -20
  29. package/dist/plugins/i18n.js.map +1 -1
  30. package/dist/plugins/keyboard.js +7 -9
  31. package/dist/plugins/keyboard.js.map +1 -1
  32. package/dist/plugins/loading.js +4 -28
  33. package/dist/plugins/loading.js.map +1 -1
  34. package/dist/plugins/streaming.js +5 -7
  35. package/dist/plugins/streaming.js.map +1 -1
  36. package/dist/plugins/sync.js +10 -11
  37. package/dist/plugins/sync.js.map +1 -1
  38. package/dist/plugins/theme-editor.js +6 -8
  39. package/dist/plugins/theme-editor.js.map +1 -1
  40. package/dist/plugins/tools.js +1 -1
  41. package/dist/renderer/NativeWebGLRenderer.d.ts +1 -1
  42. package/dist/renderer/native/draw.d.ts +1 -1
  43. package/dist/renderer/native/utils.d.ts +1 -0
  44. package/dist/scichart-engine.full.js +32 -32
  45. package/dist/scichart-engine.full.js.map +1 -1
  46. package/dist/scichart-engine.js +1 -1
  47. package/dist/theme/index.d.ts +2 -0
  48. package/dist/types.d.ts +25 -0
  49. package/dist/{math-B1FQF4XZ.js → utils-Dbro9-qM.js} +106 -106
  50. package/dist/utils-Dbro9-qM.js.map +1 -0
  51. package/package.json +1 -1
  52. package/dist/index-CaR-Pz6U.js.map +0 -1
  53. package/dist/index-CyhxCboy.js.map +0 -1
  54. package/dist/index.core-D8VXllsr.js.map +0 -1
  55. package/dist/math-B1FQF4XZ.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import { ChartTheme } from '../theme';
2
2
  import { InteractionMode } from './InteractionManager';
3
+ import { ToolbarOptions } from '../types';
3
4
 
4
5
  export interface ChartControlsCallbacks {
5
6
  onResetZoom: () => void;
@@ -10,20 +11,28 @@ export interface ChartControlsCallbacks {
10
11
  onExport: () => void;
11
12
  onAutoScale: () => void;
12
13
  onToggleLegend: (visible: boolean) => void;
14
+ onHoverStart: () => void;
15
+ onHoverEnd: () => void;
13
16
  }
14
17
  export declare class ChartControls {
15
18
  private container;
16
19
  private toolbar;
20
+ private buttonsWrapper;
17
21
  private callbacks;
18
22
  private theme;
23
+ private options;
19
24
  private isSmoothing;
20
25
  private currentMode;
21
26
  private isLegendVisible;
22
27
  private currentType;
23
- constructor(parent: HTMLElement, theme: ChartTheme, callbacks: ChartControlsCallbacks);
28
+ private isPinned;
29
+ private isExpanded;
30
+ constructor(parent: HTMLElement, theme: ChartTheme, callbacks: ChartControlsCallbacks, options?: ToolbarOptions);
24
31
  private isDarkTheme;
25
32
  private updateToolbarStyle;
33
+ private updateVisibility;
26
34
  private createButtons;
35
+ private createPinButton;
27
36
  private enforceSVGVisibility;
28
37
  private createButton;
29
38
  private updateButtonStates;
@@ -8,6 +8,9 @@ export interface ChartLegendCallbacks {
8
8
  onInteractionEnd?: () => void;
9
9
  onHoverStart?: () => void;
10
10
  onHoverEnd?: () => void;
11
+ onSeriesHoverStart?: (series: Series) => void;
12
+ onSeriesHoverEnd?: (series: Series) => void;
13
+ onToggleVisibility?: (series: Series) => void;
11
14
  }
12
15
  export declare class ChartLegend {
13
16
  private container;
@@ -17,6 +20,7 @@ export declare class ChartLegend {
17
20
  private theme;
18
21
  private series;
19
22
  private callbacks;
23
+ private swatchCanvases;
20
24
  private isDragging;
21
25
  private isResizing;
22
26
  private dragOffsetX;
@@ -30,6 +34,8 @@ export declare class ChartLegend {
30
34
  private initDragging;
31
35
  update(series: Series[]): void;
32
36
  private render;
37
+ updateSeriesStyle(s: Series): void;
38
+ private paintSwatch;
33
39
  /**
34
40
  * Internal symbol drawing logic (shared with canvas export)
35
41
  */
@@ -29,11 +29,14 @@ export declare class ChartImpl implements Chart {
29
29
  private yScales;
30
30
  private get yScale();
31
31
  theme: ChartTheme;
32
+ baseTheme: ChartTheme;
32
33
  private cursorOptions;
33
34
  private cursorPosition;
34
35
  private showLegend;
35
36
  private legend;
37
+ private originalSeriesStyles;
36
38
  private showControls;
39
+ private toolbarOptions?;
37
40
  private controls;
38
41
  private animationFrameId;
39
42
  private needsFullRender;
@@ -48,6 +51,8 @@ export declare class ChartImpl implements Chart {
48
51
  private commandQueue;
49
52
  private annotationQueue;
50
53
  private annotationIdCounter;
54
+ private tooltipConfigQueue;
55
+ private fitLineQueue;
51
56
  /** Whether the chart has been destroyed */
52
57
  get isDestroyed(): boolean;
53
58
  private selectionRect;
@@ -60,6 +65,7 @@ export declare class ChartImpl implements Chart {
60
65
  private selectionManager;
61
66
  private responsiveManager;
62
67
  get tooltip(): any;
68
+ get loading(): any;
63
69
  get deltaTool(): any;
64
70
  get peakTool(): any;
65
71
  constructor(options: ChartOptions);
@@ -9,6 +9,7 @@ export interface UIContext {
9
9
  container: HTMLDivElement;
10
10
  theme: ChartTheme;
11
11
  showControls: boolean;
12
+ toolbar?: import('../../types').ToolbarOptions;
12
13
  showLegend: boolean;
13
14
  series: Map<string, Series>;
14
15
  autoScale: () => void;
@@ -24,6 +25,9 @@ export interface UIContext {
24
25
  onInteractionEnd?: () => void;
25
26
  onHoverStart?: () => void;
26
27
  onHoverEnd?: () => void;
28
+ onSeriesHoverStart?: (series: Series) => void;
29
+ onSeriesHoverEnd?: (series: Series) => void;
30
+ onToggleVisibility?: (series: Series) => void;
27
31
  }
28
32
  export declare function initControls(ctx: UIContext): ChartControls | null;
29
33
  export declare function initLegend(ctx: UIContext, options: ChartOptions): ChartLegend | null;
@@ -33,7 +33,10 @@ export interface Chart {
33
33
  autoScale(animate?: boolean): void;
34
34
  setTheme(theme: string | object): void;
35
35
  /** Access to data analysis utilities */
36
+ /** Access to the current active theme (scaled for responsiveness) */
36
37
  readonly theme: any;
38
+ /** Access to the base theme (unscaled) */
39
+ readonly baseTheme: any;
37
40
  readonly analysis: any;
38
41
  readonly animations: any;
39
42
  addAnnotation(annotation: Annotation): string;
@@ -25,6 +25,7 @@ export interface ResponsiveBreakpoint {
25
25
  }
26
26
  /** Preset breakpoints */
27
27
  export interface ResponsiveBreakpoints {
28
+ smallMobile?: ResponsiveBreakpoint;
28
29
  mobile?: ResponsiveBreakpoint;
29
30
  tablet?: ResponsiveBreakpoint;
30
31
  desktop?: ResponsiveBreakpoint;
@@ -49,7 +50,7 @@ export interface ResponsiveState {
49
50
  /** Current container height */
50
51
  height: number;
51
52
  /** Active breakpoint name */
52
- breakpoint: 'mobile' | 'tablet' | 'desktop';
53
+ breakpoint: 'smallMobile' | 'mobile' | 'tablet' | 'desktop';
53
54
  /** Whether touch is optimized */
54
55
  touchOptimized: boolean;
55
56
  /** Whether reduced motion is enabled */
@@ -51,15 +51,7 @@ class at {
51
51
  * Enable the delta measurement tool
52
52
  */
53
53
  enable() {
54
- var s, e;
55
- if (this.state.enabled) return;
56
- this.state.enabled = !0, this.state.selectionState = "idle", this.createOverlay(), this.attachListeners(), this.ctx.container.style.cursor = "crosshair";
57
- const t = this.ctx.getSeries ? this.ctx.getSeries() : [];
58
- console.log("[DeltaTool] Enabled - Series count:", t.length), t.length > 0 && console.log("[DeltaTool] First series:", {
59
- id: t[0].id,
60
- xLength: (s = t[0].x) == null ? void 0 : s.length,
61
- yLength: (e = t[0].y) == null ? void 0 : e.length
62
- });
54
+ this.state.enabled || (this.state.enabled = !0, this.state.selectionState = "idle", this.createOverlay(), this.attachListeners(), this.ctx.container.style.cursor = "crosshair");
63
55
  }
64
56
  /**
65
57
  * Disable the delta measurement tool
@@ -548,9 +540,9 @@ class lt {
548
540
  const x = (u * y - f * g) / (u * b - f * f), S = (g - x * f) / u;
549
541
  let m = 0, v = 0, w = -1 / 0, F = 0, C = 0;
550
542
  for (let T = a; T < l; T++) {
551
- const I = n[T], Y = o[T], D = n[T + 1], B = o[T + 1], N = D - I, K = (Y + B) / 2;
543
+ const I = n[T], Y = o[T], B = n[T + 1], D = o[T + 1], N = B - I, K = (Y + D) / 2;
552
544
  v += K * N;
553
- const _ = x * I + S, et = x * D + S, it = (_ + et) / 2;
545
+ const _ = x * I + S, et = x * B + S, it = (_ + et) / 2;
554
546
  m += (K - it) * N;
555
547
  const U = Y - _;
556
548
  U > w && (w = U, F = I, C = Y);
@@ -660,12 +652,12 @@ class lt {
660
652
  return s === 0 ? "0" : s >= 1e6 || s < 1e-3 ? t.toExponential(this.options.precision - 1) : t.toPrecision(this.options.precision);
661
653
  }
662
654
  }
663
- const W = {
655
+ const E = {
664
656
  top: 10,
665
657
  right: 12,
666
658
  bottom: 10,
667
659
  left: 12
668
- }, E = {
660
+ }, W = {
669
661
  // Container
670
662
  backgroundColor: "rgba(15, 18, 25, 0.95)",
671
663
  backgroundGradient: "rgba(25, 30, 40, 0.90)",
@@ -688,7 +680,7 @@ const W = {
688
680
  contentFontSize: 11,
689
681
  lineHeight: 1.4,
690
682
  // Spacing
691
- padding: W,
683
+ padding: E,
692
684
  itemGap: 4,
693
685
  headerGap: 8,
694
686
  // Decorations
@@ -720,7 +712,7 @@ const W = {
720
712
  contentFontSize: 11,
721
713
  lineHeight: 1.4,
722
714
  // Spacing
723
- padding: W,
715
+ padding: E,
724
716
  itemGap: 4,
725
717
  headerGap: 8,
726
718
  // Decorations
@@ -786,7 +778,7 @@ const W = {
786
778
  contentFontSize: 11,
787
779
  lineHeight: 1.4,
788
780
  // Spacing
789
- padding: W,
781
+ padding: E,
790
782
  itemGap: 4,
791
783
  headerGap: 8,
792
784
  // Decorations
@@ -894,7 +886,7 @@ const W = {
894
886
  showArrow: !1,
895
887
  arrowSize: 0
896
888
  }, ct = {
897
- dark: E,
889
+ dark: W,
898
890
  light: J,
899
891
  glass: rt,
900
892
  midnight: j,
@@ -904,7 +896,7 @@ const W = {
904
896
  };
905
897
  function ut(p) {
906
898
  const t = ct[p];
907
- return t || (console.warn(`[Tooltip] Unknown theme "${p}", using dark`), E);
899
+ return t || (console.warn(`[Tooltip] Unknown theme "${p}", using dark`), W);
908
900
  }
909
901
  function ft(p, t) {
910
902
  const s = typeof p == "string" ? ut(p) : p;
@@ -926,10 +918,10 @@ function k(p) {
926
918
  return Q;
927
919
  case "dark":
928
920
  default:
929
- return E;
921
+ return W;
930
922
  }
931
923
  }
932
- const pt = E, gt = {
924
+ const pt = W, gt = {
933
925
  offset: { x: 12, y: 12 },
934
926
  preferredPosition: "auto",
935
927
  constrainToPlotArea: !0,
@@ -2075,12 +2067,12 @@ class Ft {
2075
2067
  const F = n.transform(g.x[w]), C = y.transform(g.y[w]), T = F - t, I = C - s, Y = T * T + I * I;
2076
2068
  if (Y < a) {
2077
2069
  a = Y;
2078
- const D = f.getStyle();
2070
+ const B = f.getStyle();
2079
2071
  l = {
2080
2072
  type: "datapoint",
2081
2073
  seriesId: f.getId(),
2082
2074
  seriesName: f.getId(),
2083
- seriesColor: D.color || "#ff0055",
2075
+ seriesColor: B.color || "#ff0055",
2084
2076
  dataIndex: w,
2085
2077
  dataX: g.x[w],
2086
2078
  dataY: g.y[w],
@@ -2088,8 +2080,8 @@ class Ft {
2088
2080
  pixelY: C,
2089
2081
  cycle: (u = f.getCycle) == null ? void 0 : u.call(f)
2090
2082
  };
2091
- const B = f.getYError(w);
2092
- B && (l.yError = B);
2083
+ const D = f.getYError(w);
2084
+ D && (l.yError = D);
2093
2085
  }
2094
2086
  }
2095
2087
  }
@@ -2345,7 +2337,6 @@ function $t(p = {}) {
2345
2337
  manifest: It,
2346
2338
  onInit(i) {
2347
2339
  var o;
2348
- i.log.info("SciChartEngine Tools Plugin Initialized");
2349
2340
  const n = {
2350
2341
  container: i.ui.container,
2351
2342
  getPlotArea: () => i.render.plotArea,
@@ -2389,7 +2380,7 @@ function $t(p = {}) {
2389
2380
  e == null || e.render(), t == null || t.renderOverlay(), s == null || s.renderOverlay();
2390
2381
  },
2391
2382
  onDestroy(i) {
2392
- i.log.info("SciChartEngine Tools Plugin Destroyed"), t == null || t.destroy(), s == null || s.destroy(), e == null || e.destroy(), t = null, s = null, e = null;
2383
+ t == null || t.destroy(), s == null || s.destroy(), e == null || e.destroy(), t = null, s = null, e = null;
2393
2384
  },
2394
2385
  api: {
2395
2386
  setMode(i) {
@@ -2409,4 +2400,4 @@ export {
2409
2400
  lt as b,
2410
2401
  k as g
2411
2402
  };
2412
- //# sourceMappingURL=index-CyhxCboy.js.map
2403
+ //# sourceMappingURL=index-Btz_voey.js.map