@jigonzalez930209/scichart-engine 0.1.0 → 0.2.0

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/types.d.ts CHANGED
@@ -17,6 +17,10 @@ export interface Bounds {
17
17
  export type Range = [number, number];
18
18
  export type ScaleType = "linear" | "log";
19
19
  export interface AxisOptions {
20
+ /** Unique ID for the axis (defaults to 'default') */
21
+ id?: string;
22
+ /** Axis position */
23
+ position?: "left" | "right" | "top" | "bottom";
20
24
  /** Scale type */
21
25
  scale?: ScaleType;
22
26
  /** Axis label (e.g., 'E / V') */
@@ -32,12 +36,47 @@ export interface AxisOptions {
32
36
  /** Enable autoscaling */
33
37
  auto?: boolean;
34
38
  }
35
- export type SeriesType = "line" | "scatter" | "line+scatter";
39
+ export type SeriesType = "line" | "scatter" | "line+scatter" | "step" | "step+scatter" | "band" | "area";
40
+ /** Step mode defines where the step occurs */
41
+ export type StepMode = "before" | "after" | "center";
42
+ /** Error bar direction */
43
+ export type ErrorBarDirection = "both" | "positive" | "negative";
36
44
  export interface SeriesData {
37
45
  /** X values (potential, time, etc.) */
38
46
  x: Float32Array | Float64Array;
39
47
  /** Y values (current, charge, etc.) */
40
48
  y: Float32Array | Float64Array;
49
+ /** Symmetric Y error (±error) */
50
+ yError?: Float32Array | Float64Array;
51
+ /** Asymmetric Y error - positive direction (upward) */
52
+ yErrorPlus?: Float32Array | Float64Array;
53
+ /** Asymmetric Y error - negative direction (downward) */
54
+ yErrorMinus?: Float32Array | Float64Array;
55
+ /** Symmetric X error (±error) - for horizontal error bars */
56
+ xError?: Float32Array | Float64Array;
57
+ /** Asymmetric X error - positive direction (rightward) */
58
+ xErrorPlus?: Float32Array | Float64Array;
59
+ /** Asymmetric X error - negative direction (leftward) */
60
+ xErrorMinus?: Float32Array | Float64Array;
61
+ /** Second Y-values for band/area charts (lower boundary or baseline) */
62
+ y2?: Float32Array | Float64Array;
63
+ }
64
+ /** Error bar styling options */
65
+ export interface ErrorBarStyle {
66
+ /** Show error bars (default: true if error data present) */
67
+ visible?: boolean;
68
+ /** Error bar color (default: same as series) */
69
+ color?: string;
70
+ /** Error bar line width (default: 1) */
71
+ width?: number;
72
+ /** Cap width in pixels (default: 6) */
73
+ capWidth?: number;
74
+ /** Show caps at the end of error bars (default: true) */
75
+ showCaps?: boolean;
76
+ /** Opacity (default: 0.7) */
77
+ opacity?: number;
78
+ /** Direction: show both, positive only, or negative only */
79
+ direction?: ErrorBarDirection;
41
80
  }
42
81
  export interface SeriesStyle {
43
82
  /** Line/point color (hex or rgb) */
@@ -50,12 +89,24 @@ export interface SeriesStyle {
50
89
  pointSize?: number;
51
90
  /** Smoothing factor (0 = none, 1 = full) */
52
91
  smoothing?: number;
53
- }
92
+ /** Step mode: where the step transition occurs (default: 'after') */
93
+ stepMode?: StepMode;
94
+ /** Error bar styling */
95
+ errorBars?: ErrorBarStyle;
96
+ /** Scatter symbol shape (default: 'circle') */
97
+ symbol?: ScatterSymbol;
98
+ /** Dash pattern [dash, gap] - empty for solid */
99
+ lineDash?: number[];
100
+ }
101
+ /** Available scatter symbol shapes */
102
+ export type ScatterSymbol = 'circle' | 'square' | 'diamond' | 'triangle' | 'triangleDown' | 'cross' | 'x' | 'star';
54
103
  export interface SeriesOptions {
55
104
  /** Unique identifier */
56
105
  id: string;
57
106
  /** Series type */
58
107
  type: SeriesType;
108
+ /** ID of the Y Axis this series belongs to */
109
+ yAxisId?: string;
59
110
  /** Data arrays */
60
111
  data: SeriesData;
61
112
  /** Visual style */
@@ -64,12 +115,16 @@ export interface SeriesOptions {
64
115
  visible?: boolean;
65
116
  /** Cycle number (for CV) */
66
117
  cycle?: number;
118
+ /** Maximum number of points to keep (rolling window) */
119
+ maxPoints?: number;
67
120
  }
68
121
  export interface SeriesUpdateData {
69
122
  /** New X values */
70
123
  x?: Float32Array | Float64Array;
71
124
  /** New Y values */
72
125
  y?: Float32Array | Float64Array;
126
+ /** New Y2 values (for bands) */
127
+ y2?: Float32Array | Float64Array;
73
128
  /** If true, append to existing data; if false, replace */
74
129
  append?: boolean;
75
130
  }
@@ -78,8 +133,8 @@ export interface ChartOptions {
78
133
  container: HTMLDivElement;
79
134
  /** X-axis configuration */
80
135
  xAxis?: AxisOptions;
81
- /** Y-axis configuration */
82
- yAxis?: AxisOptions;
136
+ /** Y-axis configuration (single or array) */
137
+ yAxis?: AxisOptions | AxisOptions[];
83
138
  /** Background color (overrides theme) */
84
139
  background?: string;
85
140
  /** Device pixel ratio (default: window.devicePixelRatio) */
@@ -95,12 +150,18 @@ export interface ChartOptions {
95
150
  };
96
151
  /** Show in-chart controls (default: false) */
97
152
  showControls?: boolean;
153
+ /** Automatically follow new data (default: false) */
154
+ autoScroll?: boolean;
155
+ /** Show statistics panel (default: false) */
156
+ showStatistics?: boolean;
98
157
  }
99
158
  export interface ZoomOptions {
100
159
  /** X-axis range [min, max] */
101
160
  x?: Range;
102
161
  /** Y-axis range [min, max] */
103
162
  y?: Range;
163
+ /** ID of the specific Y axis to zoom (if applicable) */
164
+ axisId?: string;
104
165
  /** Animate the transition */
105
166
  animate?: boolean;
106
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jigonzalez930209/scichart-engine",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "jigonzalez930209",
5
5
  "license": "MIT",
6
6
  "repository": {