Hi there,
I want to use the GRAPH widget in XY mode in order to display an MPPT curve in real time (like in the attached image). Therefore I want to indicate the maximum power point and the corresponding current value with a marker (cross or circle). I was already able to modify the example WIDGET_GraphXY.c in order to get the expected behavior with the aid of a owner draw callback function (see attached source file).
Unfortunately I am not completely satisfied with my solution and therefore I have the following questions:
1. Is it possible to update a single graph data object without calling GRAPH_DATA_XY_Clear() and GRAPH_DATA_XY_AddPoint()? I was looking for an invalidation function like WM_InvalidateWindow() but without success...
2. Is it possible to get the index of the currently drawn point in the user defined owner draw callback function? I would like to look for the "MPP" value in the data array before I draw the graph and then I want to draw the indicator at the corresponding point index in the user defined owner draw callback function.
3. Is there a WM message or notification which informs me if the graph data object is cleared, updated or if a point is added?
I also found this thread How to make marker on graph widget in the forum, but I think that my solution with the owner draw callback function would be more elegant.
Furthermore I noticed that there are some undocumented function declarations in GRAPH.h...
Hope you can help me.
regards Thomas
I want to use the GRAPH widget in XY mode in order to display an MPPT curve in real time (like in the attached image). Therefore I want to indicate the maximum power point and the corresponding current value with a marker (cross or circle). I was already able to modify the example WIDGET_GraphXY.c in order to get the expected behavior with the aid of a owner draw callback function (see attached source file).
Unfortunately I am not completely satisfied with my solution and therefore I have the following questions:
1. Is it possible to update a single graph data object without calling GRAPH_DATA_XY_Clear() and GRAPH_DATA_XY_AddPoint()? I was looking for an invalidation function like WM_InvalidateWindow() but without success...
2. Is it possible to get the index of the currently drawn point in the user defined owner draw callback function? I would like to look for the "MPP" value in the data array before I draw the graph and then I want to draw the indicator at the corresponding point index in the user defined owner draw callback function.
3. Is there a WM message or notification which informs me if the graph data object is cleared, updated or if a point is added?
I also found this thread How to make marker on graph widget in the forum, but I think that my solution with the owner draw callback function would be more elegant.
Furthermore I noticed that there are some undocumented function declarations in GRAPH.h...
Hope you can help me.
regards Thomas
The post was edited 2 times, last by Thomas W. ().