GRAPH - vertical rescale - how to?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • GRAPH - vertical rescale - how to?


      I use GRAPH for showing some value.
      What is right way to rescale a curve that represents this value?
      I would like to use Min and Max values (EDIT-widgets) to set a vertical range of this value to show it on a graph only inside this range.
      If the deviation of value gets smaller I would like to see this deviation and decrease range.
      If the deviation increases again then I manually change Min-Max and would like to rescale already existing graph-curve of value.

      How to do it?
      I know there are the functions GRAPH_DATA_YT_GetValue and GRAPH_DATA_YT_Clear.
      But how to fill the GRAPH_DATA_Handle by recalculated data again?
      I did not find a function like GRAPH_DATA_YT_SetValue - for setting recalculating history data.
      Should I delete previous GRAPH_DATA_Handle by every range change, or there is a way to rewrite recalculated data to existing GRAPH_DATA_Hadle to rescale and redraw its curve (history) properly?
      Best regards,
    • Hello,

      suppose there is no way to replace data in the current data handle.

      I'd do something like this:

      1. Clear the graph from current data curve with GRAPH_DetachData().

      2. Delete and create a new data handler with the same handle variable using GRAPH_DATA_YT_Delete()/GRAPH_DATA_YT_Create(). If there is enough memory then don't delete a current data handle and simply create a separate data handler with recalculated data.

      3. Attach new data curve to the graph with GRAPH_AttachData().