|
1 | 1 | # SharpAstrology.HumanDesign.BlazorComponents - A Blazor component library for SharpAstrology.HumanDesign |
2 | 2 |
|
| 3 | +The goal of this package is to provide typical human design components. Contributions for alternative charts are welcome. |
| 4 | + |
| 5 | +## How to use the chart in Blazor? |
3 | 6 | ```C# |
4 | 7 | @using SharpAstrology.DataModels |
| 8 | +@using SharpAstrology.Enums |
5 | 9 | @using SharpAstrology.Ephemerides |
6 | 10 | @using SharpAstrology.HumanDesign.BlazorComponents |
7 | 11 |
|
8 | | - |
9 | | -<HumanDesignGraph Chart="chart" Height="800px"/> |
| 12 | +<PageTitle>Human Design Chart Example</PageTitle> |
| 13 | + |
| 14 | + |
| 15 | +<HumanDesignGraph Chart="chart" Height="800px" |
| 16 | + CenterColorMap="_centerColorMap" |
| 17 | + FirstComparerColor="@firstComparerColor" |
| 18 | + SecondComparerColor="@secondComparerColor" |
| 19 | + /> |
10 | 20 |
|
11 | 21 |
|
12 | 22 | @code |
13 | 23 | { |
14 | 24 | [Inject] SwissEphemeridesService EphService { get; set; } |
15 | 25 | private HumanDesignChart chart; |
16 | 26 |
|
| 27 | + // These are the default colors and optional parameters. |
| 28 | + private readonly string firstComparerColor = "#000000"; |
| 29 | + private readonly string secondComparerColor = "#ff4081"; |
| 30 | + private Dictionary<Centers, string> _centerColorMap = new() |
| 31 | + { |
| 32 | + [Centers.Root] = "#E88835", |
| 33 | + [Centers.Sacral] = "#FE352C", |
| 34 | + [Centers.Emotions] = "#E88835", |
| 35 | + [Centers.Spleen] = "#E88835", |
| 36 | + [Centers.Heart] = "#FE352C", |
| 37 | + [Centers.Self] = "#FFD12B", |
| 38 | + [Centers.Throat] = "#E88835", |
| 39 | + [Centers.Mind] = "#87FE49", |
| 40 | + [Centers.Crown] = "#FFD12B" |
| 41 | + }; |
| 42 | + |
| 43 | + |
17 | 44 | protected override void OnInitialized() |
18 | 45 | { |
19 | 46 | using var eph = EphService.CreateContext(); |
|
0 commit comments