@rm-graph/core 0.1.2 → 0.1.3

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ChartConfig, a as ChartInstance, T as ThemeConfig, S as SeriesData, b as ChartEventMap, L as LineChartConfig, D as DataPoint, B as BarChartConfig, A as AreaChartConfig, H as HeatmapChartConfig, c as Surface3DChartConfig } from './index-DWzDIVQ9.js';
2
- export { e as AnimationConfig, j as AxisConfig, l as ChartClickEvent, m as ChartHoverEvent, k as ChartType, G as GridLineConfig, n as LegendClickEvent, h as LegendConfig, o as PanEvent, P as PieChartConfig, R as RenderedEvent, d as ScatterChartConfig, t as ThemeManager, i as TitleConfig, f as TooltipConfig, g as TooltipData, X as XAxisConfig, Y as YAxisConfig, Z as ZoomEvent, q as darkTheme, u as getThemeManager, p as lightTheme, s as midnightTheme, r as modernTheme } from './index-DWzDIVQ9.js';
1
+ import { C as ChartConfig, a as ChartInstance, T as ThemeConfig, S as SeriesData, b as ChartEventMap, c as Surface3DChartConfig, P as PRPDChartConfig, d as PRPDDataPoint, e as PRPDResolutionLabel, f as PRPDWindowingRegion, g as PRPDChartStats, D as DataPoint } from './index-QzUVGlSo.js';
2
+ export { A as AnimationConfig, m as AxisConfig, q as ChartClickEvent, r as ChartHoverEvent, n as ChartType, G as GridLineConfig, s as LegendClickEvent, L as LegendConfig, o as PRPDResolutionMode, p as PRPDResolutionQuality, t as PanEvent, h as PieChartConfig, R as RenderedEvent, i as ScatterChartConfig, y as ThemeManager, l as TitleConfig, j as TooltipConfig, k as TooltipData, X as XAxisConfig, Y as YAxisConfig, Z as ZoomEvent, v as darkTheme, z as getThemeManager, u as lightTheme, x as midnightTheme, w as modernTheme } from './index-QzUVGlSo.js';
3
3
  import { SciChartSurface, SciChart3DSurface } from 'scichart';
4
4
  export { SciChartSurface } from 'scichart';
5
5
 
@@ -64,6 +64,11 @@ declare abstract class BaseChart<TConfig extends ChartConfig> implements ChartIn
64
64
  * Manually resize the chart
65
65
  */
66
66
  resize(width?: number, height?: number): void;
67
+ /**
68
+ * Reset zoom to fit all data (zoom extents)
69
+ * Note: not part of the ChartInstance interface, but available on concrete chart classes.
70
+ */
71
+ resetZoom(): void;
67
72
  /**
68
73
  * Export chart as image
69
74
  */
@@ -98,186 +103,6 @@ declare abstract class BaseChart<TConfig extends ChartConfig> implements ChartIn
98
103
  isReady(): boolean;
99
104
  }
100
105
 
101
- /**
102
- * Line Chart implementation using SciChart
103
- */
104
- declare class LineChart extends BaseChart<LineChartConfig> {
105
- private dataSeries;
106
- private renderableSeries;
107
- private wasmContext;
108
- constructor(config: LineChartConfig);
109
- /**
110
- * Create the SciChart surface for line chart
111
- */
112
- protected createSurface(): Promise<void>;
113
- /**
114
- * Add series to the chart
115
- */
116
- private addSeries;
117
- /**
118
- * Set new data for the chart
119
- */
120
- setData(data: SeriesData[]): void;
121
- /**
122
- * Update specific series data
123
- */
124
- updateSeriesData(seriesName: string, data: DataPoint[] | number[]): void;
125
- /**
126
- * Append data to a series
127
- */
128
- appendData(seriesName: string, data: DataPoint | DataPoint[]): void;
129
- /**
130
- * Clear all series
131
- */
132
- private clearSeries;
133
- /**
134
- * Update chart
135
- */
136
- protected update(): void;
137
- /**
138
- * Apply theme to line chart
139
- */
140
- protected applyTheme(): void;
141
- /**
142
- * Destroy and clean up
143
- */
144
- destroy(): void;
145
- }
146
- /**
147
- * Factory function to create a line chart
148
- */
149
- declare function createLineChart(container: HTMLElement | string, config: LineChartConfig): Promise<LineChart>;
150
-
151
- /**
152
- * Bar/Column Chart implementation using SciChart
153
- */
154
- declare class BarChart extends BaseChart<BarChartConfig> {
155
- private dataSeries;
156
- private renderableSeries;
157
- private wasmContext;
158
- constructor(config: BarChartConfig);
159
- /**
160
- * Create the SciChart surface for bar chart
161
- */
162
- protected createSurface(): Promise<void>;
163
- /**
164
- * Add series to the chart
165
- */
166
- private addSeries;
167
- /**
168
- * Set new data for the chart
169
- */
170
- setData(data: SeriesData[]): void;
171
- /**
172
- * Update specific series data
173
- */
174
- updateSeriesData(seriesName: string, data: DataPoint[] | number[]): void;
175
- /**
176
- * Clear all series
177
- */
178
- private clearSeries;
179
- /**
180
- * Update chart
181
- */
182
- protected update(): void;
183
- /**
184
- * Destroy and clean up
185
- */
186
- destroy(): void;
187
- }
188
- /**
189
- * Factory function to create a bar chart
190
- */
191
- declare function createBarChart(container: HTMLElement | string, config: BarChartConfig): Promise<BarChart>;
192
-
193
- /**
194
- * Area Chart implementation using SciChart
195
- */
196
- declare class AreaChart extends BaseChart<AreaChartConfig> {
197
- private dataSeries;
198
- private renderableSeries;
199
- private wasmContext;
200
- constructor(config: AreaChartConfig);
201
- /**
202
- * Create the SciChart surface for area chart
203
- */
204
- protected createSurface(): Promise<void>;
205
- /**
206
- * Add series to the chart
207
- */
208
- private addSeries;
209
- /**
210
- * Set new data for the chart
211
- */
212
- setData(data: SeriesData[]): void;
213
- /**
214
- * Update specific series data
215
- */
216
- updateSeriesData(seriesName: string, data: DataPoint[] | number[]): void;
217
- /**
218
- * Clear all series
219
- */
220
- private clearSeries;
221
- /**
222
- * Update chart
223
- */
224
- protected update(): void;
225
- /**
226
- * Destroy and clean up
227
- */
228
- destroy(): void;
229
- }
230
- /**
231
- * Factory function to create an area chart
232
- */
233
- declare function createAreaChart(container: HTMLElement | string, config: AreaChartConfig): Promise<AreaChart>;
234
-
235
- /**
236
- * Heatmap Chart implementation using SciChart
237
- */
238
- declare class HeatmapChart extends BaseChart<HeatmapChartConfig> {
239
- private heatmapDataSeries;
240
- private heatmapSeries;
241
- private wasmContext;
242
- constructor(config: HeatmapChartConfig);
243
- /**
244
- * Create the SciChart surface for heatmap chart
245
- */
246
- protected createSurface(): Promise<void>;
247
- /**
248
- * Add heatmap data to the chart
249
- */
250
- private addHeatmapData;
251
- /**
252
- * Set new data for the chart (for heatmap, this updates zValues)
253
- */
254
- setData(_data: SeriesData[]): void;
255
- /**
256
- * Set new z-values for the heatmap
257
- */
258
- setZValues(zValues: number[][]): void;
259
- /**
260
- * Update specific cell values
261
- */
262
- updateCell(x: number, y: number, value: number): void;
263
- /**
264
- * Clear heatmap data
265
- */
266
- private clearHeatmap;
267
- /**
268
- * Update chart
269
- */
270
- protected update(): void;
271
- /**
272
- * Destroy and clean up
273
- */
274
- destroy(): void;
275
- }
276
- /**
277
- * Factory function to create a heatmap chart
278
- */
279
- declare function createHeatmapChart(container: HTMLElement | string, config: HeatmapChartConfig): Promise<HeatmapChart>;
280
-
281
106
  /**
282
107
  * 3D Surface Chart implementation using SciChart
283
108
  */
@@ -468,6 +293,107 @@ declare class Column3DChart {
468
293
  */
469
294
  declare function createColumn3DChart(container: HTMLElement | string, config: Column3DChartConfig): Promise<Column3DChart>;
470
295
 
296
+ /**
297
+ * PRPD (Phase Resolved Partial Discharge) Chart implementation using SciChart
298
+ *
299
+ * This chart displays partial discharge data as a heatmap with:
300
+ * - X-axis: Phase angle (0-360°)
301
+ * - Y-axis: Amplitude (mVp or other unit)
302
+ * - Color intensity: Pulse count at each phase/amplitude bin
303
+ * - Optional sine wave overlay
304
+ * - Resolution modes (UNI/BI, HI/LO)
305
+ * - Windowing support for filtering regions
306
+ */
307
+ declare class PRPDChart {
308
+ readonly id: string;
309
+ private container;
310
+ private chartHost;
311
+ private surface;
312
+ private wasmContext;
313
+ private config;
314
+ private isDestroyed;
315
+ private heatmapDataSeries;
316
+ private heatmapSeries;
317
+ private heatmapColorMap;
318
+ private heatmapLegend;
319
+ private heatmapLegendDiv;
320
+ private sineDataSeries;
321
+ private sineLineSeries;
322
+ private xAxis;
323
+ private yAxis;
324
+ private stats;
325
+ private onStatsChange?;
326
+ constructor(config: PRPDChartConfig);
327
+ /**
328
+ * Initialize the chart in the given container
329
+ */
330
+ init(container: HTMLElement | string): Promise<void>;
331
+ /**
332
+ * Create the SciChart surface
333
+ */
334
+ private createSurface;
335
+ private createHeatmap;
336
+ private createSineWave;
337
+ private createHeatmapLegend;
338
+ private clearHeatmapLegend;
339
+ /**
340
+ * Update chart with new data
341
+ */
342
+ updateData(data: PRPDDataPoint[]): void;
343
+ /**
344
+ * Update resolution label (UNI/BI, HI/LO)
345
+ */
346
+ setResolutionLabel(label: PRPDResolutionLabel): void;
347
+ /**
348
+ * Update windowing data
349
+ */
350
+ setWindowingData(windowingData: PRPDWindowingRegion[]): void;
351
+ /**
352
+ * Update Y-axis range
353
+ */
354
+ setYAxisRange(range: number): void;
355
+ /**
356
+ * Set stats change callback
357
+ */
358
+ onStats(callback: (stats: PRPDChartStats) => void): void;
359
+ /**
360
+ * Get current statistics
361
+ */
362
+ getStats(): PRPDChartStats;
363
+ /**
364
+ * Refresh the chart with current configuration
365
+ */
366
+ refresh(): void;
367
+ /**
368
+ * Set chart options
369
+ */
370
+ setOptions(options: Partial<PRPDChartConfig>): void;
371
+ /**
372
+ * Reset zoom to full extent
373
+ */
374
+ resetZoom(): void;
375
+ /**
376
+ * Export chart as image
377
+ */
378
+ exportImage(format?: "png" | "jpeg"): Promise<string>;
379
+ /**
380
+ * Get current configuration
381
+ */
382
+ getConfig(): PRPDChartConfig;
383
+ /**
384
+ * Check if chart is ready
385
+ */
386
+ isReady(): boolean;
387
+ /**
388
+ * Destroy and clean up
389
+ */
390
+ destroy(): void;
391
+ }
392
+ /**
393
+ * Factory function to create a PRPD chart
394
+ */
395
+ declare function createPRPDChart(container: HTMLElement | string, config: PRPDChartConfig): Promise<PRPDChart>;
396
+
471
397
  /**
472
398
  * Generate a unique ID
473
399
  */
@@ -545,14 +471,12 @@ declare const VERSION = "0.1.1";
545
471
  *
546
472
  * // Use local WASM files
547
473
  * configureSciChart({
548
- * wasmUrl: '/scichart2d.wasm',
549
- * dataUrl: '/scichart2d.data'
474
+ * wasmUrl: '/scichart2d.wasm'
550
475
  * });
551
476
  * ```
552
477
  */
553
478
  declare function configureSciChart(options: {
554
479
  wasmUrl?: string;
555
- dataUrl?: string;
556
480
  }): void;
557
481
 
558
- export { AreaChart, AreaChartConfig, BarChart, BarChartConfig, BaseChart, ChartConfig, ChartEventMap, ChartInstance, Column3DChart, type Column3DChartConfig, type Column3DDataPoint, DataPoint, HeatmapChart, HeatmapChartConfig, LineChart, LineChartConfig, SeriesData, Surface3DChart, Surface3DChartConfig, ThemeConfig, VERSION, calculateDataRange, clamp, configureSciChart, createAreaChart, createBarChart, createColumn3DChart, createHeatmapChart, createLineChart, createSurface3DChart, debounce, deepMerge, extractXValues, extractYValues, formatNumber, generateId, hexToRgba, lerp, normalizeDataPoints, parseSize, throttle };
482
+ export { BaseChart, ChartConfig, ChartEventMap, ChartInstance, Column3DChart, type Column3DChartConfig, type Column3DDataPoint, DataPoint, PRPDChart, PRPDChartConfig, PRPDChartStats, PRPDDataPoint, PRPDResolutionLabel, PRPDWindowingRegion, SeriesData, Surface3DChart, Surface3DChartConfig, ThemeConfig, VERSION, calculateDataRange, clamp, configureSciChart, createColumn3DChart, createPRPDChart, createSurface3DChart, debounce, deepMerge, extractXValues, extractYValues, formatNumber, generateId, hexToRgba, lerp, normalizeDataPoints, parseSize, throttle };