Widget chart between table filter date

How could I modify the start and end of the Trend of a Widget that is within a page, using the date filter selected in the table?
Right now I have like this. But I need it to be from the date selected in the filter.

->between(
   start: now()->startOfMonth(),
   end: now()->endOfMonth()
)
Was this page helpful?