Both sparklines and charts allow the time range to be configured, either as a start/end time (based on a formula) or on a certain duration in minutes (which can be based on a formula or a constant). In the case of a duration the chart end time will be the time that data is refreshed.