Limit Date Range To Last 7 Days

Hi there, I’m looking to limit my x-axis range to the last 7 days, using the current time as the starting point. I’m implementing it in Mendix, which uses a JSON format, similar to the JavaScript implementation of Plotly.