SharpAstrology.Vedic.BlazorComponents 0.2.0

dotnet add package SharpAstrology.Vedic.BlazorComponents --version 0.2.0
                    
NuGet\Install-Package SharpAstrology.Vedic.BlazorComponents -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpAstrology.Vedic.BlazorComponents" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpAstrology.Vedic.BlazorComponents" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="SharpAstrology.Vedic.BlazorComponents" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpAstrology.Vedic.BlazorComponents --version 0.2.0
                    
#r "nuget: SharpAstrology.Vedic.BlazorComponents, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharpAstrology.Vedic.BlazorComponents@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpAstrology.Vedic.BlazorComponents&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=SharpAstrology.Vedic.BlazorComponents&version=0.2.0
                    
Install as a Cake Tool

SharpAstrology.Vedic.BlazorComponents

This package provides useful Blazor components to display information of an AstrologyChart class from the SharpAstrology.Base package in the charts of Vedic astrology.

${\color{red}This \space package \space is \space still \space experimental. \space Interfaces \space can \space change \space before \space version \space 1.0.0.}$

SharpAstrology Packages

Package Description Licence
SharpAstrology.Base Base library MIT
SharpAstrology.SwissEph Ephemerides package based on SwissEphNet AGPL-3.0
SharpAstrology.Symbols.BlazorComponents Astrological symbols as Blazor components MIT
SharpAstrology.HumanDesign Extensions for the Human Design system MIT
SharpAstrology.HumanDesign.BlazorComponents Human Design charts as Blazor components MIT
SharpAstrology.Vedic Extensions for Vedic astrology systems MIT
SharpAstrology.Vedic.BlazorComponents Vedic astrology charts as Blazor components MIT
SharpAstrology.West Extensions for western astrology systems MIT
SharpAstrology.West.BlazorComponents Western astrology charts as Blazor components MIT
SharpAstrology.WebApp Blazor Server app built on the SharpAstrology packages AGPL-3.0

Install

dotnet add package SharpAstrology.Vedic.BlazorComponents

This package depends on SharpAstrology.Vedic and on SharpAstrology.Symbols.BlazorComponents. Here is the dependency graph.

flowchart LR
    symbols[SharpAstrology.Symbols.BlazorComponents]-->base[SharpAstrology.Base]
    vedic[SharpAstrology.Vedic]-->base
    comp[SharpAstrology.Vedic.BlazorComponents]-->vedic
    comp-->symbols
    vedic-.->|optional|eph[SharpAstrology.SwissEph]

The components live in the namespace SharpAstrology.BlazorComponents, the same namespace SharpAstrology.West.BlazorComponents uses. Both packages can be used side by side without an alias.

Examples

Setup

All examples use the SharpAstrology.SwissEph package.

dotnet add package SharpAstrology.SwissEph

Create a Blazor project with interactive server components and inject the SwissEphemeridesService.

Update the program.cs file.

...
using SharpAstrology.Ephemerides;

...

builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents();
builder.Services.AddSingleton<SwissEphemeridesService>();
...

How can I display a south indian chart?

@using SharpAstrology.DataModels
@using SharpAstrology.Enums
@using SharpAstrology.Ephemerides
@using SharpAstrology.BlazorComponents
@rendermode InteractiveServer

<PageTitle>South Indian Chart Example</PageTitle>

<div style="width: 600px">
    <SouthIndianChart Chart="chart"/>
</div>

@code
{
    [Inject] SwissEphemeridesService EphService { get; set; }
    private AstrologyChart chart;

    protected override void OnInitialized()
    {
        using var eph = EphService.CreateContext(Ayanamsas.Lahiri);
        chart = new AstrologyChart(new DateTime(1988, 9, 4, 1, 15, 0, DateTimeKind.Utc), eph,
            51.0, 11.0, mode: EphCalculationMode.Sidereal);
    }
}

Astro Chart

Which zodiac does the chart use?

The one the chart was calculated in. The component has no zodiac of its own. An AstrologyChart stands in exactly one zodiac, chart.CalculationMode says which one, and the component draws the longitudes as they are.

Vedic astrology works in the constellations, so a rashi chart is built with EphCalculationMode.Sidereal, as in the example above. The ayanamsa of the ephemerides says where Aries begins, and CreateContext takes the one you want. A tropically calculated chart is allowed as well. A transit chart has to stand in the same zodiac as the chart.

How can I display a chart with transits?

The planets of the second chart are drawn outside of the boxes. ShowComparator widens the viewBox to make room for them.

@using SharpAstrology.DataModels
@using SharpAstrology.Enums
@using SharpAstrology.Ephemerides
@using SharpAstrology.BlazorComponents
@rendermode InteractiveServer

<PageTitle>South Indian Transit Chart Example</PageTitle>

<div style="width: 600px">
    <SouthIndianChart Chart="chart"
                      ComparatorChart="transits"
                      ShowComparator="true"
                      OnClickCallback="(x)=>Console.WriteLine(x)"/>
</div>

@code
{
    [Inject] SwissEphemeridesService EphService { get; set; }
    private AstrologyChart chart;
    private AstrologyChart transits;

    protected override void OnInitialized()
    {
        using var eph = EphService.CreateContext(Ayanamsas.Lahiri);
        chart = new AstrologyChart(new DateTime(1988, 9, 4, 1, 15, 0, DateTimeKind.Utc), eph,
            51.0, 11.0, mode: EphCalculationMode.Sidereal);
        transits = new AstrologyChart(DateTime.UtcNow, eph, mode: EphCalculationMode.Sidereal);
    }
}

Both charts have to stand in the same zodiac, so the mode is given twice.

OnClickCallback reports what was clicked. A planet hands over a Planets, a box a Zodiac and a house number a Houses.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 107 7/30/2026

0.2.0: Breaking. The parameter ZodiacMode and the enum VedicZodiacModes are gone. The component draws the chart in the zodiac the chart was calculated in, so a rashi chart is built with EphCalculationMode.Sidereal. Before, the component subtracted the ayanamsa itself, which was a second source of truth next to the chart and drew a sidereally calculated chart about 24 degrees off. A comparator chart in another zodiac than the chart is refused with an InvalidOperationException. The parameter HouseNumbering and the enum VedicHouseNumberings are gone as well. The house numbers of the chart come from the house system the chart was calculated with, so whoever wants the whole sign numbering builds the chart with HouseSystems.WholeSign. Its cusps now fall on the box boundaries in either zodiac, which is why the second numbering lost its reason to exist. The elements of the drawing carry data attributes naming what they stand for. Needs SharpAstrology.Base 0.14.0 through SharpAstrology.Vedic 0.4.0.