* Destroy the gauge and clean up resources
()
| 1184 | * Destroy the gauge and clean up resources |
| 1185 | */ |
| 1186 | destroy() { |
| 1187 | // Cancel any running animations |
| 1188 | if (this.animator) { |
| 1189 | this.animator.cancel(); |
| 1190 | } |
| 1191 | |
| 1192 | // Clean up SVG renderer |
| 1193 | if (this.renderer) { |
| 1194 | this.renderer.remove(); |
| 1195 | } |
| 1196 | |
| 1197 | // Clear container |
| 1198 | if (this.node?.parentNode) { |
| 1199 | this.node.innerHTML = ''; |
| 1200 | } |
| 1201 | |
| 1202 | // Clear references |
| 1203 | this.node = null; |
| 1204 | this.config = null; |
| 1205 | this.renderer = null; |
| 1206 | this.animator = null; |
| 1207 | this.canvas = null; |
| 1208 | } |
| 1209 | |
| 1210 | /** |
| 1211 | * Get current gauge value |
no test coverage detected