add modifiers for daysums, monthsums etc.
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
#include <aqdiagram/data/date.h>
|
||||
#include <aqdiagram/data/floatingavg.h>
|
||||
#include <aqdiagram/data/accumulate.h>
|
||||
#include <aqdiagram/data/negate.h>
|
||||
|
||||
#include <gwenhywfar/debug.h>
|
||||
|
||||
@@ -209,6 +211,31 @@ void AQDG_TimeGraph_ModifyDataAndAddCurve(AQDG_GRAPH *g, const char *sLabel, con
|
||||
case 'S': graphType=AQDG_GRAPH_TYPE_STEPLINE; s++; break;
|
||||
case 'P': graphType=AQDG_GRAPH_TYPE_POINTS; s++; break;
|
||||
case 'B': graphType=AQDG_GRAPH_TYPE_BARS; s++; break;
|
||||
|
||||
case 'A':
|
||||
newDp=AQDG_Data_Accumulate(dpList);
|
||||
AQDG_Graph_DataPair_List_free(dpList);
|
||||
dpList=newDp;
|
||||
AQDG_Graph_DataPair_List_SortByValueX(dpList, 1);
|
||||
break;
|
||||
case 'D':
|
||||
newDp=AQDG_Data_DaySums(dpList);
|
||||
AQDG_Graph_DataPair_List_free(dpList);
|
||||
dpList=newDp;
|
||||
AQDG_Graph_DataPair_List_SortByValueX(dpList, 1);
|
||||
break;
|
||||
case 'M':
|
||||
newDp=AQDG_Data_MonthSums(dpList);
|
||||
AQDG_Graph_DataPair_List_free(dpList);
|
||||
dpList=newDp;
|
||||
AQDG_Graph_DataPair_List_SortByValueX(dpList, 1);
|
||||
break;
|
||||
case 'N':
|
||||
newDp=AQDG_Data_NegateY(dpList);
|
||||
AQDG_Graph_DataPair_List_free(dpList);
|
||||
dpList=newDp;
|
||||
AQDG_Graph_DataPair_List_SortByValueX(dpList, 1);
|
||||
break;
|
||||
case 'd':
|
||||
newDp=AQDG_Data_DayAverage(dpList);
|
||||
AQDG_Graph_DataPair_List_free(dpList);
|
||||
|
||||
Reference in New Issue
Block a user