Hi,
Using a Local Data Filter on the time variable would give you this functionality "out of the box". To do this, right-click on the red triangle menu of the graph itself, select Local Data Filter, and add the time variable to the filter. By dragging the slider bars, or typing into the text edit boxes below the sliders, you can set the display range of interest. As an example of this, run the code below to produce the output in the screenshot below.
Names Default To Here(1);
nr = 50;
dt = astable (J(nr, 1, randominteger(3e9, 3.5e9)) || J(nr, 1, randomuniform(0,20)), <<column names({"Date", "Value"}));
dt:date << Input Format( "ddMonyyyy h:m:s", 0 ) << Format( "ddMonyyyy h:m:s", 22, 0 );
dt << Graph Builder(
Variables( X( :Date ), Y( :Value ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
Show Control Panel (0),
Local Data Filter(
Width( 329 ),
Show Histograms and Bars( 0 ),
Add Filter(
columns( :Date ),
Where( :Date >= 3097580000 & :Date <= 3418250000 ),
Display( :Date, Height( 20 ) )
)
)
);
-Brady