-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from danheron/feature/mudblazor-8
Feature/mudblazor 8
- Loading branch information
Showing
15 changed files
with
151 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 63 additions & 63 deletions
126
Heron.MudCalendar.Docs/Pages/Extending/TotalCalendar.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,63 @@ | ||
@using Heron.MudTotalCalendar | ||
|
||
<MudTotalCalendar Values="BuildTestData()"/> | ||
|
||
@code { | ||
|
||
private List<Value> BuildTestData() | ||
{ | ||
var power = new ValueDefinition | ||
{ | ||
Name = "Power", | ||
Units = "kWh", | ||
FormatString = "N2", | ||
Style = "background-color: #AD1457; color: #ffffff;" | ||
}; | ||
var offpeak = new ValueDefinition | ||
{ | ||
Name = "Off-peak", | ||
Units = "EUR", | ||
PrefixUnits = true, | ||
FormatString = "N2", | ||
Style = "background-color: #1565C0; color: #ffffff;" | ||
}; | ||
var peak = new ValueDefinition | ||
{ | ||
Name = "Peak", | ||
Units = "EUR", | ||
PrefixUnits = true, | ||
FormatString = "N2", | ||
Style = "background-color: #2E7D32; color: #ffffff;" | ||
}; | ||
var total = new ValueDefinition | ||
{ | ||
Name = "Total", | ||
Units = "EUR", | ||
PrefixUnits = true, | ||
FormatString = "N2", | ||
Style = "background-color: #EF6C00; color: #ffffff;" | ||
}; | ||
|
||
return new List<Value> | ||
{ | ||
// Today | ||
new() { Date = DateTime.Today, Definition = power, Amount = 3.34 }, | ||
new() { Date = DateTime.Today, Definition = peak, Amount = 4.34 }, | ||
new() { Date = DateTime.Today, Definition = offpeak, Amount = 2.34 }, | ||
new() { Date = DateTime.Today, Definition = total, Amount = 6.68 }, | ||
|
||
// Tomorrow | ||
new() { Date = DateTime.Today.AddDays(-1), Definition = power, Amount = 4.89 }, | ||
new() { Date = DateTime.Today.AddDays(-1), Definition = peak, Amount = 5.23 }, | ||
new() { Date = DateTime.Today.AddDays(-1), Definition = offpeak, Amount = 3.32 }, | ||
new() { Date = DateTime.Today.AddDays(-1), Definition = total, Amount = 8.55 }, | ||
|
||
// The next day | ||
new() { Date = DateTime.Today.AddDays(-2), Definition = power, Amount = 2.97 }, | ||
new() { Date = DateTime.Today.AddDays(-2), Definition = peak, Amount = 5.78 }, | ||
new() { Date = DateTime.Today.AddDays(-2), Definition = offpeak, Amount = 2.98 }, | ||
new() { Date = DateTime.Today.AddDays(-2), Definition = total, Amount = 8.76 } | ||
}; | ||
} | ||
|
||
} | ||
@* @using Heron.MudTotalCalendar *@ | ||
@* *@ | ||
@* <MudTotalCalendar Values="BuildTestData()"/> *@ | ||
@* *@ | ||
@* @code { *@ | ||
@* *@ | ||
@* private List<Value> BuildTestData() *@ | ||
@* { *@ | ||
@* var power = new ValueDefinition *@ | ||
@* { *@ | ||
@* Name = "Power", *@ | ||
@* Units = "kWh", *@ | ||
@* FormatString = "N2", *@ | ||
@* Style = "background-color: #AD1457; color: #ffffff;" *@ | ||
@* }; *@ | ||
@* var offpeak = new ValueDefinition *@ | ||
@* { *@ | ||
@* Name = "Off-peak", *@ | ||
@* Units = "EUR", *@ | ||
@* PrefixUnits = true, *@ | ||
@* FormatString = "N2", *@ | ||
@* Style = "background-color: #1565C0; color: #ffffff;" *@ | ||
@* }; *@ | ||
@* var peak = new ValueDefinition *@ | ||
@* { *@ | ||
@* Name = "Peak", *@ | ||
@* Units = "EUR", *@ | ||
@* PrefixUnits = true, *@ | ||
@* FormatString = "N2", *@ | ||
@* Style = "background-color: #2E7D32; color: #ffffff;" *@ | ||
@* }; *@ | ||
@* var total = new ValueDefinition *@ | ||
@* { *@ | ||
@* Name = "Total", *@ | ||
@* Units = "EUR", *@ | ||
@* PrefixUnits = true, *@ | ||
@* FormatString = "N2", *@ | ||
@* Style = "background-color: #EF6C00; color: #ffffff;" *@ | ||
@* }; *@ | ||
@* *@ | ||
@* return new List<Value> *@ | ||
@* { *@ | ||
@* // Today *@ | ||
@* new() { Date = DateTime.Today, Definition = power, Amount = 3.34 }, *@ | ||
@* new() { Date = DateTime.Today, Definition = peak, Amount = 4.34 }, *@ | ||
@* new() { Date = DateTime.Today, Definition = offpeak, Amount = 2.34 }, *@ | ||
@* new() { Date = DateTime.Today, Definition = total, Amount = 6.68 }, *@ | ||
@* *@ | ||
@* // Tomorrow *@ | ||
@* new() { Date = DateTime.Today.AddDays(-1), Definition = power, Amount = 4.89 }, *@ | ||
@* new() { Date = DateTime.Today.AddDays(-1), Definition = peak, Amount = 5.23 }, *@ | ||
@* new() { Date = DateTime.Today.AddDays(-1), Definition = offpeak, Amount = 3.32 }, *@ | ||
@* new() { Date = DateTime.Today.AddDays(-1), Definition = total, Amount = 8.55 }, *@ | ||
@* *@ | ||
@* // The next day *@ | ||
@* new() { Date = DateTime.Today.AddDays(-2), Definition = power, Amount = 2.97 }, *@ | ||
@* new() { Date = DateTime.Today.AddDays(-2), Definition = peak, Amount = 5.78 }, *@ | ||
@* new() { Date = DateTime.Today.AddDays(-2), Definition = offpeak, Amount = 2.98 }, *@ | ||
@* new() { Date = DateTime.Today.AddDays(-2), Definition = total, Amount = 8.76 } *@ | ||
@* }; *@ | ||
@* } *@ | ||
@* *@ | ||
@* } *@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.