A React radar screen component that displays a grid-based radar visualization with customizable highlighting capabilities.
Class_Radar_Screen) is available in the source code and provides the same functionality with proper rotation behavior.
Configurable sections and depth levels
Dynamic point highlighting with custom colors
Adjustable rotation and orientation
Automatic distance calculation and display
import { Class_Radar_Screen } from './jsc_mctrl_radar_screen';
const MyComponent = () => {
const highlightedPoints = [
[3, 2, '#ff0000'], // section 3, depth 2, red
[5, 4, '#00ff00'] // section 5, depth 4, green
];
return (
<Class_Radar_Screen
sections={8}
depth={4}
rotation_steps={0}
rotation={0}
highlighted_points={highlightedPoints}
draw_pointer={true}
/>
);
};
| Prop | Type | Default | Description |
|---|---|---|---|
sections |
number | 8 | Number of radial sections (rays) |
depth |
number | 4 | Number of concentric circles |
rotation_steps |
number | 0 | Rotation steps between rays |
rotation |
number | 0 | Free rotation in radians |
highlighted_points |
array | [] | Array of [section, depth, color] points |
draw_pointer |
boolean | false | Draw north arrow pointer |