dateArithmetic vs. setTime

Good morning Team,

I am working on a time series chart with a startDate and endDate buttons to allow end users to select a date range but they also start at specifc times.

The dateArithmetic is set to show the last 2 hours when the popup is selected. This way also allows users to select a date range and it will show and allow export.

The setTime starts at 5:30 am when the popup is selected. The issue is that when a date range is selected it will quickly show the new selected date but then fall back to the 5:30 am.

I am assuming the difference between the two time sets are the difference.

Anyone have any ideas to resolve?

You are missing the (0) in the set time version of now()
Without the 0, it will keep firing.

2 Likes

Awesome, thanks for helping.

I am learning as i go :slight_smile:

now() fires at the default scan rate - typically 1000 ms.
now(0) fires once on load.
now(1234) fires once every 1234 ms.