@rm-graph/core 0.1.9 → 0.1.10
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/README.md +52 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,9 +36,58 @@ chart.destroy();
|
|
|
36
36
|
|
|
37
37
|
## Chart Types
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
### `createColumn3DChart`
|
|
40
|
+
|
|
41
|
+
3D column/bar chart for phase-resolved data visualization. Built on SciChart 3D with WebGL rendering.
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { createColumn3DChart } from '@rm-graph/core';
|
|
45
|
+
import type { Column3DDataPoint, Column3DChartStats } from '@rm-graph/core';
|
|
46
|
+
|
|
47
|
+
const chart = await createColumn3DChart('container-id', {
|
|
48
|
+
data: [[45, 1500, 1], [90, 2200, 2], [180, 1800, 3]],
|
|
49
|
+
xAxisTitle: 'Phase Angle (°)',
|
|
50
|
+
yAxisTitle: 'Amplitude (mVp)',
|
|
51
|
+
zAxisTitle: 'Cycle',
|
|
52
|
+
xRange: { min: 0, max: 360 },
|
|
53
|
+
yRange: { min: 0, max: 5000 },
|
|
54
|
+
zRange: { min: 0, max: 50 },
|
|
55
|
+
barFill: '#52aaf2',
|
|
56
|
+
barOpacity: 0.95,
|
|
57
|
+
showSineWave: true,
|
|
58
|
+
enableCameraClamping: true,
|
|
59
|
+
onStatsChange: (stats: Column3DChartStats) => {
|
|
60
|
+
console.log('Pulse Count:', stats.pulseCount, 'Peak:', stats.peakValue);
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Update data
|
|
65
|
+
chart.setData([[50, 1600, 1], [95, 2300, 2]]);
|
|
66
|
+
|
|
67
|
+
// Change camera preset
|
|
68
|
+
chart.setCameraPreset(0); // Top view
|
|
69
|
+
|
|
70
|
+
// Reset camera
|
|
71
|
+
chart.resetCamera();
|
|
72
|
+
|
|
73
|
+
// Take screenshot
|
|
74
|
+
chart.captureScreenshot('chart-screenshot');
|
|
75
|
+
|
|
76
|
+
// Cleanup
|
|
77
|
+
chart.destroy();
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Data format**: `[phaseAngle, amplitude, cycle]` - each tuple represents a 3D column bar.
|
|
81
|
+
|
|
82
|
+
**Key features**: Camera presets, orbit rotation with clamping, sine wave overlay, zoom control, screenshot export, statistics tracking.
|
|
83
|
+
|
|
84
|
+
### `createPRPDChart`
|
|
85
|
+
|
|
86
|
+
Phase Resolved Partial Discharge heatmap visualization.
|
|
87
|
+
|
|
88
|
+
**Data format**: `[phaseAngle, amplitude, count]` - each tuple represents pulse density at a given position.
|
|
89
|
+
|
|
90
|
+
**Key features**: Heatmap color coding, sine wave overlay, resolution modes, windowing support, screenshot export.
|
|
42
91
|
|
|
43
92
|
## Theming
|
|
44
93
|
|