Expand description
§xalen-chart — SVG Chart Rendering
Renders astrological charts as SVG strings. Zero external dependencies beyond the XALEN core crates. No browser, no canvas, no image library needed.
§Supported chart styles
- North Indian diamond chart (Vedic standard)
- South Indian box chart
- Western wheel chart
§Quick start
use xalen_chart::{ChartData, PlanetPosition, render_north_indian};
let chart = ChartData {
planet_positions: vec![
PlanetPosition { abbreviation: "Su".into(), house: 1, longitude_deg: 15.0 },
PlanetPosition { abbreviation: "Mo".into(), house: 4, longitude_deg: 105.0 },
],
house_cusps_deg: [0.0, 30.0, 60.0, 90.0, 120.0, 150.0,
180.0, 210.0, 240.0, 270.0, 300.0, 330.0],
ascendant_sign_index: 0,
ayanamsa_deg: 23.87,
};
let svg = render_north_indian(&chart);
assert!(svg.starts_with("<svg"));Structs§
- Chart
Data - All data needed to render any chart style.
- Planet
Position - A planet’s position for chart rendering.
Functions§
- render_
north_ indian - Render a North Indian diamond chart (Vedic standard).
- render_
south_ indian - Render a South Indian box chart.
- render_
western_ wheel - Render a Western wheel chart.