This commit is contained in:
2026-06-28 13:58:35 +03:00
parent 8f45028715
commit e6bf8258bb
114 changed files with 4365 additions and 874 deletions
@@ -0,0 +1,46 @@
@code {
[Parameter] public ReplayDataSeries? DataSeries { get; set; }
private List<ReplayDataPoint> BathroomData => DataSeries?.GetSeries("Shower", "BathroomHumidity").ToList() ?? [];
private List<ReplayDataPoint> HomeData => DataSeries?.GetSeries("Shower", "HomeHumidity").ToList() ?? [];
private List<ReplayDataPoint> DiffData => DataSeries?.GetSeries("Shower", "Differential").ToList() ?? [];
private ApexChartOptions<ReplayDataPoint> ChartOptions => new()
{
Chart = new Chart { Background = "transparent", ForeColor = "#adb5bd" },
Theme = new Theme { Mode = Mode.Dark },
Stroke = new Stroke { Curve = Curve.Smooth, Width = 2 },
Xaxis = new XAxis { Type = XAxisType.Datetime },
Yaxis = [new YAxis { Title = new AxisTitle { Text = "Humidity %" }, DecimalsInFloat = 1 }],
Tooltip = new Tooltip { X = new TooltipX { Format = "HH:mm" } },
Grid = new Grid { BorderColor = "#343a40" }
};
}
@if (BathroomData.Count > 0)
{
<ApexChart TItem="ReplayDataPoint" Options="ChartOptions" Height="300">
<ApexPointSeries TItem="ReplayDataPoint"
Items="BathroomData"
SeriesType="SeriesType.Line"
Name="Bathroom Humidity"
XValue="p => p.Timestamp.ToLocalTime().DateTime"
YValue="p => (decimal)p.Value" />
<ApexPointSeries TItem="ReplayDataPoint"
Items="HomeData"
SeriesType="SeriesType.Line"
Name="Home Humidity"
XValue="p => p.Timestamp.ToLocalTime().DateTime"
YValue="p => (decimal)p.Value" />
<ApexPointSeries TItem="ReplayDataPoint"
Items="DiffData"
SeriesType="SeriesType.Area"
Name="Differential"
XValue="p => p.Timestamp.ToLocalTime().DateTime"
YValue="p => (decimal)p.Value" />
</ApexChart>
}
else
{
<div class="text-muted text-center py-4">No shower data available</div>
}