|
|
|
|
@ -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);
|
|
|
|
|
@ -419,7 +416,7 @@ namespace SmartAquaViewer.ViewModel
|
|
|
|
|
: new LinearAxis
|
|
|
|
|
{
|
|
|
|
|
Position = AxisPosition.Bottom,
|
|
|
|
|
Title = xAxisField.Display
|
|
|
|
|
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);
|
|
|
|
|
|