SharpAstrology.HumanDesign.BlazorComponents 0.4.0

dotnet add package SharpAstrology.HumanDesign.BlazorComponents --version 0.4.0
                    
NuGet\Install-Package SharpAstrology.HumanDesign.BlazorComponents -Version 0.4.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.HumanDesign.BlazorComponents" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpAstrology.HumanDesign.BlazorComponents" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="SharpAstrology.HumanDesign.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.HumanDesign.BlazorComponents --version 0.4.0
                    
#r "nuget: SharpAstrology.HumanDesign.BlazorComponents, 0.4.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.HumanDesign.BlazorComponents@0.4.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.HumanDesign.BlazorComponents&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=SharpAstrology.HumanDesign.BlazorComponents&version=0.4.0
                    
Install as a Cake Tool

SharpAstrology.HumanDesign.BlazorComponents - A Blazor component library for SharpAstrology.HumanDesign

The goal of this package is to provide typical human design components. Contributions for alternative charts are welcome.

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

How to use the chart in Blazor?

@using SharpAstrology.DataModels
@using SharpAstrology.Enums
@using SharpAstrology.Ephemerides
@using SharpAstrology.HumanDesign.BlazorComponents

<PageTitle>Human Design Chart Example</PageTitle>


<div style="display: flex; flex-direction: row; height: 700px; align-items: center; justify-content: space-between; max-width: 800px">
    
    <HumanDesignActivations Activations="chart.PersonalityActivation" Height="500px" PlanetsRight="false"
                            States="chart.PersonalityFixation"/>
    
    <HumanDesignGraph Chart="chart"
                      CenterColorMap="centerColorMap"
                      FirstComparerColor="@firstComparerColor"
                      SecondComparerColor="@secondComparerColor"
                      OnGateClick="OnGateClick"
    />
        
    <HumanDesignActivations Activations="chart.DesignActivation" Height="500px" PlanetsRight="true"
                            States="chart.DesignFixation" Color="#ff4081" ChangedByComparatorColor="green"/>
</div>


@code
{
    [Inject] SwissEphemeridesService EphService { get; set; }
    private HumanDesignChart chart;
    
    // These are the default colors and optional parameters.
    private readonly string firstComparerColor = "#000000";
    private readonly string secondComparerColor = "#ff4081";
    private Dictionary<Centers, string> centerColorMap = new()
    {
            [Centers.Root] = "#E88835",
            [Centers.Sacral] = "#FE352C",
            [Centers.Emotions] = "#E88835",
            [Centers.Spleen] = "#E88835",
            [Centers.Heart] = "#FE352C",
            [Centers.Self] = "#FFD12B",
            [Centers.Throat] = "#E88835",
            [Centers.Mind] = "#87FE49",
            [Centers.Crown] = "#FFD12B"
    };
    
    
    protected override void OnInitialized()
    {
        using var eph = EphService.CreateContext();
        chart = new HumanDesignChart(new DateTime(1988, 9, 4, 1, 15, 0, DateTimeKind.Utc), eph);
    }

    private void OnGateClick(Gates gate) => Console.WriteLine($"Gate {gate.ToNumber()} was clicked.");
}

A Human Design chart example

The parameters of HumanDesignGraph

Parameter Default Meaning
Chart required The chart that is drawn.
Width, Height auto, 100% Width and height of the outer svg element.
FirstComparerColor #000000 Colour of everything the first comparator activates.
SecondComparerColor #ff4081 Colour of everything the second comparator activates.
InactiveChannelColor lightgrey Colour of a channel half that no comparator activates.
CenterColorMap DefaultCenterColorMap Fill of the defined centers. A center the map leaves out falls back to the default map.
UndefinedCenterColor white Fill of a center that is not defined.
IdPrefix empty Written in front of the id of every center and gate. Empty means no ids are written at all.
OnGateClick none Raised with the clicked Gates value.
OnChannelClick none Raised with the clicked Channels value.
OnCenterClick none Raised with the clicked Centers value.

Centers and gates always carry a data-center and a data-gate attribute. data-center holds the name of the center, data-gate the number of the gate. Both may appear more than once on a page, which is why they are data attributes and not ids. Set IdPrefix if you need real ids, for example IdPrefix="left-" and IdPrefix="right-" for two charts next to each other.

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.4.0 103 7/30/2026
0.2.1 445 6/18/2024
0.2.0 233 5/21/2024
0.1.0 242 5/13/2024