Classic Chart dynamically change date range

to set it clearer (I do not alway express my self right enough in english), the attached figure show my intentions :

whenever I press the “Historical” button, its text change to “Real” and all the inputs below change to visible=1. But the chart I haven’t got to set it to real time :frowning:

The fact is that the easy chart controls for the histotical range are not as intuitive as I need to make queries to retrieve info grouped by seconds, minutes …