Manipulate the relative time range in Grafana Dashboard according to custom variables

Hi, i have my grafana dashboard to view the Gatling test results(with panels having graphs such as response time of api per second, no of requests per sec etc…). I have the timestamp values for the start time and end time of the test from my postgress DB. And i want to look at the data for this time range only for a particular test.I was trying to figure out a way to automatically adjust the relative time range in the individual panels of the graphs whenever test id(global variable) is changed What i want to achieve is:-

  1. Is there any way to change the values of “from and to” global variables through our custom created variables?
  2. If no, then is there a way to zoom the data of the individual graphs(by manipulating time in the queries itself) of the panels according to the start and end time of my test irrespective of the time chosen on the time panel already present on the dashboard so that we don’t have to manually select and enter the relative time range( which is a tedious task for a large no of tests) every time we want to look at the stats of different tests.