Time range auto change according variable

Hello,

i would like to realize a time range auto change function in graph.
in my case i have many orders, which produced in different times(dates)
i built an order variable , which can choose specific order.
i want that when i choose a order ,the time range can auto change according the chosen order,
otherwise i have to enlarge the time range on the right top of page to find when the order produced.
please give to some advice, thanks.