Create a pop up from a button

Hi All,
I'm currently developing a SCADA, I would like to create a button that when clicked will pop up with a time series trend I've created and when clicked again will minimize it

Create your trend as a separate view. On your button configure a popup event that opens this view.