Add historical tags to a graph dynamically

Hello
In my project I need to add historical tags to a graph dynamically, clicking on them for example, some way to do this?
ignition 8

thanks you