diff --git a/SmartAquaViewer/Controls/GraphControl.xaml b/SmartAquaViewer/Controls/GraphControl.xaml
index 4cd8d4f..a05ec79 100644
--- a/SmartAquaViewer/Controls/GraphControl.xaml
+++ b/SmartAquaViewer/Controls/GraphControl.xaml
@@ -10,7 +10,8 @@
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0"
+ Background="Transparent"/>
diff --git a/SmartAquaViewer/View/CCTVView.xaml b/SmartAquaViewer/View/CCTVView.xaml
index 19e3fe0..44720c7 100644
--- a/SmartAquaViewer/View/CCTVView.xaml
+++ b/SmartAquaViewer/View/CCTVView.xaml
@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:SmartAquaViewer.View"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
-
+
diff --git a/SmartAquaViewer/View/EnegyView.xaml b/SmartAquaViewer/View/EnegyView.xaml
index 90ade57..07265f2 100644
--- a/SmartAquaViewer/View/EnegyView.xaml
+++ b/SmartAquaViewer/View/EnegyView.xaml
@@ -14,7 +14,7 @@
-
+
diff --git a/SmartAquaViewer/View/GreenHouseView.xaml b/SmartAquaViewer/View/GreenHouseView.xaml
index 4878842..7c9240d 100644
--- a/SmartAquaViewer/View/GreenHouseView.xaml
+++ b/SmartAquaViewer/View/GreenHouseView.xaml
@@ -14,7 +14,7 @@
-
+
diff --git a/SmartAquaViewer/View/MonitoringView.xaml b/SmartAquaViewer/View/MonitoringView.xaml
index 78d294b..2dbdf85 100644
--- a/SmartAquaViewer/View/MonitoringView.xaml
+++ b/SmartAquaViewer/View/MonitoringView.xaml
@@ -18,17 +18,17 @@
-
-
+
+
-
+
+
@@ -36,7 +36,7 @@
Style="{StaticResource DataGridStyle}"
RowStyle="{StaticResource DataGridRowStyle}"
ColumnHeaderStyle="{StaticResource DataGridColumnHeaderStyle}"
- Grid.Row="1" Margin="20 20 20 40"
+ Grid.Row="1" Margin="15 0 15 40"
ColumnWidth="*"
Background="Transparent"
HorizontalAlignment="Stretch">
@@ -95,7 +95,7 @@
@@ -134,7 +134,7 @@
-
@@ -332,41 +332,7 @@
-
-
-
@@ -514,8 +480,8 @@
-
+
diff --git a/SmartAquaViewer/ViewModel/GraphControlViewModel.cs b/SmartAquaViewer/ViewModel/GraphControlViewModel.cs
index 7bc2c6f..c02aad3 100644
--- a/SmartAquaViewer/ViewModel/GraphControlViewModel.cs
+++ b/SmartAquaViewer/ViewModel/GraphControlViewModel.cs
@@ -21,7 +21,7 @@ namespace SmartAquaViewer.ViewModel
private void InitializeGraph()
{
- Model.TextColor = OxyColors.Black;
+ Model.TextColor = OxyColors.LightGray;
}
public void SetTankLineGraph(
@@ -40,10 +40,10 @@ namespace SmartAquaViewer.ViewModel
{
Position = AxisPosition.Bottom,
Title = xField.Display,
- StringFormat = "MM-dd\nHH:mm",
+ StringFormat = "HH:mm:ss",
IntervalType = DateTimeIntervalType.Minutes,
MajorGridlineStyle = LineStyle.Solid,
- MinorGridlineStyle = LineStyle.Dot
+ MinorGridlineStyle = LineStyle.Dot,
}
: new LinearAxis
{
@@ -126,7 +126,6 @@ namespace SmartAquaViewer.ViewModel
LegendPosition = LegendPosition.RightTop,
LegendOrientation = LegendOrientation.Vertical,
LegendTitle = "수조",
- TextColor = OxyColors.Black
});
Model.InvalidatePlot(true);
}
@@ -146,7 +145,7 @@ namespace SmartAquaViewer.ViewModel
StringFormat = "HH:mm:ss",
IntervalType = DateTimeIntervalType.Minutes,
MajorGridlineStyle = LineStyle.Solid,
- MinorGridlineStyle = LineStyle.Dot
+ MinorGridlineStyle = LineStyle.Dot,
};
var yAxis = new LinearAxis
{
@@ -193,7 +192,6 @@ namespace SmartAquaViewer.ViewModel
LegendPosition = LegendPosition.RightTop,
LegendOrientation = LegendOrientation.Vertical,
LegendTitle = dataType == DataType.Energy ? "전력 소비량" : "온실가스 배출량",
- TextColor = OxyColors.Black
});
Model.InvalidatePlot(true);
@@ -230,7 +228,7 @@ namespace SmartAquaViewer.ViewModel
var yAxis = new LinearAxis
{
Position = AxisPosition.Left,
- Title = yField.Display,
+ Title = yField!.Display,
MajorGridlineStyle = LineStyle.Solid,
MinorGridlineStyle = LineStyle.Dot
};
@@ -389,7 +387,6 @@ namespace SmartAquaViewer.ViewModel
LegendPosition = LegendPosition.RightTop,
LegendOrientation = LegendOrientation.Vertical,
LegendTitle = "수조",
- TextColor = OxyColors.Black
});
Model.InvalidatePlot(true);
@@ -413,13 +410,13 @@ namespace SmartAquaViewer.ViewModel
? new DateTimeAxis
{
Position = AxisPosition.Bottom,
- Title = xAxisField.Display,
+ Title = xAxisField.Display,
StringFormat = "MM-dd\nHH:mm"
}
: new LinearAxis
{
- Position = AxisPosition.Bottom,
- Title = xAxisField.Display
+ Position = AxisPosition.Bottom,
+ Title = xAxisField.Display,
};
var yAxis = new LinearAxis
{
@@ -523,18 +520,6 @@ namespace SmartAquaViewer.ViewModel
LegendPosition = LegendPosition.RightTop,
LegendOrientation = LegendOrientation.Vertical,
LegendTitle = "수조",
- TextColor = OxyColors.Black
- });
-
- Model.Legends.Clear();
- Model.IsLegendVisible = showLegends;
- Model.Legends.Add(new Legend
- {
- LegendPlacement = LegendPlacement.Outside,
- LegendPosition = LegendPosition.RightTop,
- LegendOrientation = LegendOrientation.Vertical,
- LegendTitle = "수조",
- TextColor = OxyColors.Black
});
Model.InvalidatePlot(true);
@@ -623,34 +608,9 @@ namespace SmartAquaViewer.ViewModel
Model.Axes.Add(new LinearAxis
{
Position = AxisPosition.Left,
- Title = "값"
+ Title = "값",
});
- //var series = new StairStepSeries
- //{
- // MarkerType = showMarker ? MarkerType.Circle : MarkerType.None,
- //};
-
- //int i = 0;
- //foreach (var r in collection.OrderBy(r => r.RecordedTime))
- //{
- // string? rawValue = ResolveStatus(r, yAxisField.Name);
- // if (rawValue != null)
- // {
- // double y = MapDeviceStatus(rawValue);
- // series.Points.Add(new DataPoint(i, y));
- // }
- // else
- // {
- // double? uvPower = ResolveUvPowerPerId(r, yAxisField.Name);
- // if (uvPower.HasValue)
- // {
- // series.Points.Add(new DataPoint(i, uvPower.Value));
- // }
- // }
- // i++;
- //}
-
foreach (var field in yAxisFields)
{
var series = new StairStepSeries
@@ -691,7 +651,6 @@ namespace SmartAquaViewer.ViewModel
LegendPosition = LegendPosition.RightTop,
LegendOrientation = LegendOrientation.Vertical,
LegendTitle = "수조",
- TextColor = OxyColors.Black
});
Model.InvalidatePlot(true);
@@ -778,7 +737,6 @@ namespace SmartAquaViewer.ViewModel
LegendPosition = LegendPosition.RightTop,
LegendOrientation = LegendOrientation.Vertical,
LegendTitle = dataType == DataType.Energy ? "전력 소비량" : "온실가스 배출량",
- TextColor = OxyColors.Black
});
Model.InvalidatePlot(true);
diff --git a/SmartAquaViewer/ViewModel/MainViewModel.cs b/SmartAquaViewer/ViewModel/MainViewModel.cs
index 2eac303..e332f84 100644
--- a/SmartAquaViewer/ViewModel/MainViewModel.cs
+++ b/SmartAquaViewer/ViewModel/MainViewModel.cs
@@ -55,15 +55,15 @@ namespace SmartAquaViewer.ViewModel
SelectedViewModel = new MonitoringViewModel(); // Default view
//더미데이터 생성 및 파일로 저장
- for (int i = 1; i <= 10; i++)
- {
- DateTime date = new(2025, 8, i);
- var dataList = WaterQualityVO.GetSampleData(date, date, 24);
- var jsonStr = JsonConvert.SerializeObject(dataList, Formatting.Indented);
+ //for (int i = 1; i <= 10; i++)
+ //{
+ // DateTime date = new(2025, 8, i);
+ // var dataList = WaterQualityVO.GetSampleData(date, date, 24);
+ // var jsonStr = JsonConvert.SerializeObject(dataList, Formatting.Indented);
- string fileName = date.ToString("yyyy-MM-dd") + ".json";
- File.WriteAllText(fileName, jsonStr);
- }
+ // string fileName = date.ToString("yyyy-MM-dd") + ".json";
+ // File.WriteAllText(fileName, jsonStr);
+ //}
}
private void SwapView(object obj)