My JSL script that uses "Page By" ends up looking like this:

I have a JSL script I recorded from Graph Builder that contains this code:
Variables(
X( :MeasurementDate ),
Y( :Data ),
Page ( :Metric),
Overlay( :Period )
),
But as shown above all the plots display right on top of each other.
I can fix it by un-dragging "Metric" from the "Page By" box and then re-dragging it into the "Page By" box, at which point the graphs display properly. But is there a way to write the script so that the individual graphs display properly and not as a jumbled mess?
Using JMP 12.2.0 on Windows 10.