I am trying to get my chart to update as more data is added. but I need a check to see if the cell contains a 0 or not and if it does then don't update. I want to use

C10:INDEX(C10:C19,IFERROR(MATCH(0,C10:C19,0)-1,COUNT(C10:C19))) <- the cell range here defines the X values for both of my curves in my chart
D10:INDEX(D10:D19,IFERROR(MATCH(0,D10:D19,0)-1,COUNT(D10:D19))) <- the cell range here defines the Y values for curve 1
E10:INDEX(E10:E19,IFERROR(MATCH(0,E10:E19,0)-1,COUNT(E10:E19))) <- the cell range here defines the Y values for curve 2 that is on the same chart

XValues, Y Values1, Y Values2
30, 176.7, 176.7,
60, 297.9, 121.2,
90, 468.3, 170.4,
120, 643.9, 175.6,
150, 808.6, 164.7,
180, 991.9, 183.3,
210, 1111, 119.1,
240, 1222, 111,
270, 1342, 120,
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0,
...etc etc where these 0's are updated by a different function based on conditions. I need my chart to reflect the changes so if a 0 is changed to a neg or positive value then the graph shows the change otherwise it doesn't.

how can you achieve this using a dynamic range