Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

XY chart display only a portion of a curve

2021-03-25
2021-03-25
  • augustaseltva

    augustaseltva - 2021-03-25

    Hello everyone,

    is there a way when using XY chart, that when a data array elements equal to a specific value, I dont display that section of the curve, or lets say, change the color of it? I have a real datatype array of size 300, and from 0 to 120 element I have normal values, but from 121 to 299 I have zeros, hence I dont want to display that portion. Think of it as a trace :) I've attached a screenshot below.

     
  • augustaseltva

    augustaseltva - 2021-03-25

    As I posted this, I thought of a solution, simply write an IF statement, where you check if the value is equal to zero, if it is, then the x axis max value is determined by the index of the last element before the zeros :)

     

Log in to post a comment.