aktueller Stand

This commit is contained in:
Meik
2026-01-28 12:08:39 +01:00
parent 1283750829
commit ee1f54675e
104 changed files with 6797 additions and 1867 deletions

View File

@@ -555,21 +555,34 @@ namespace FasdDesktopUi.Basics.UserControls
}
}
public void SetValuesLineGraph()
{
try
{
double oneDayMs = TimeSpan.FromDays(1).TotalMilliseconds;
double chartStartMs = 0;
double chartEndMs = oneDayMs;
foreach (var data in GraphicDataProperty)
{
DateTime dataTime = data.Time;
double dataValue = data.Value;
int dataDuration = data.Duration;
double time = dataTime.TimeOfDay.TotalMilliseconds;
double startMs = dataTime.TimeOfDay.TotalMilliseconds;
double endMs = startMs + dataDuration;
double xLeft = xCoordinate.GetCoordinate(time);
double xRight = xCoordinate.GetCoordinate(time + dataDuration);
if (startMs >= chartEndMs || endMs <= chartStartMs)
continue;
if (startMs < chartStartMs)
startMs = chartStartMs;
if (endMs > chartEndMs)
endMs = chartEndMs;
double xLeft = xCoordinate.GetCoordinate(startMs);
double xRight = xCoordinate.GetCoordinate(endMs);
double y = 0;
@@ -585,19 +598,19 @@ namespace FasdDesktopUi.Basics.UserControls
{
y = yCoordinate.GetCoordinate(dataValue);
}
Border border = new Border()
{
Height = 6.0,
Width = xRight - xLeft,
Width = xRight - xLeft,
CornerRadius = new CornerRadius(4.0),
ToolTip = dataTime.ToShortTimeString() + " - " + dataTime.AddMilliseconds(dataDuration).ToShortTimeString() + " | " + dataValue,
};
if (border.Width < 6)
{
border.Width = 6;
}
border.Width = 6;
}
if (ChartData.IsThresholdActive == false)
{
border.Background = new SolidColorBrush(Color.FromRgb(0, 157, 221));
@@ -652,16 +665,30 @@ namespace FasdDesktopUi.Basics.UserControls
{
try
{
double oneDayMs = TimeSpan.FromDays(1).TotalMilliseconds;
double chartStartMs = 0;
double chartEndMs = oneDayMs;
foreach (var data in GraphicDataProperty)
{
DateTime dataTime = data.Time;
double dataValue = data.Value;
int dataDuration = data.Duration;
double time = dataTime.TimeOfDay.TotalMilliseconds;
double startMs = dataTime.TimeOfDay.TotalMilliseconds;
double endMs = startMs + dataDuration;
double xLeft = xCoordinate.GetCoordinate(time);
double xRight = xCoordinate.GetCoordinate(time + dataDuration);
if (startMs >= chartEndMs || endMs <= chartStartMs)
continue;
if (startMs < chartStartMs)
startMs = chartStartMs;
if (endMs > chartEndMs)
endMs = chartEndMs;
double xLeft = xCoordinate.GetCoordinate(startMs);
double xRight = xCoordinate.GetCoordinate(endMs);
double y = 0;