레이더 그래프에 5가지 상태창 추가

피봇 기능 추가
This commit is contained in:
2017-08-08 00:48:27 +09:00
parent 879b3abda4
commit 9be9aa439a
15 changed files with 766 additions and 153 deletions

View File

@@ -185,15 +185,16 @@ namespace friction
return m_strCurTable;
}
public List<RADAR_CHART> GetAvgAll(string strSpring)
public List<RADAR_CHART> GetAvgAll(string strSpring, Config.RANGE TempCond, Config.RANGE HumidCond)
{
string strQuery = string.Format("[{0}]='{1}'", Config.COLUMN_NAME.SPRING, strSpring);
string strQuery = string.Format("[{0}]='{1}' and [{2}]>={3} and [{2}]<={4} and [{5}]>={6} and [{5}]<={7}",
Config.COLUMN_NAME.SPRING, strSpring,
Config.COLUMN_NAME.TEMP, TempCond.m_fLow, TempCond.m_fHigh,
Config.COLUMN_NAME.HUMIDITY, HumidCond.m_fLow, HumidCond.m_fHigh);
DataRow[] rows = m_Data.Select(strQuery);
var group = rows
.GroupBy(r => r[Config.COLUMN_NAME.TABLE]);
var group = rows.GroupBy(r => r[Config.COLUMN_NAME.TABLE]);
List<RADAR_CHART> result = rows
.GroupBy(r => r[Config.COLUMN_NAME.TABLE])
.Select(t => new RADAR_CHART
@@ -211,10 +212,12 @@ namespace friction
public List<TREND_CHART> GetTrendChart(string strSpring, string strTable)
{
List<TREND_CHART> result = new List<TREND_CHART>();
if (m_Data.Rows.Count == 0)
return result;
string strQuery = string.Format("[{0}]='{1}' and [{2}]='{3}'", Config.COLUMN_NAME.SPRING, strSpring, Config.COLUMN_NAME.TABLE, strTable);
DataRow[] rows = m_Data.Select(strQuery);
List<TREND_CHART> result = new List<TREND_CHART>();
foreach(DataRow r in rows)
{
result.Add(new TREND_CHART