Graphing depending on chosen variable

Hello,
I am currently trying to display charts depending on the user chosen value.
Let’s say the user has choices X_Count or Y_Count from variable named ${User_Choice}.
Once the user chooses either of the two choices, I wanted the panel to show the corresponding chart by pulling up the value (ex. X_Count) and query it right in the query text. Below is an what I tried so far but it seems like I cannot put a variable in a variable…

image

And I made variables like this:

image

Is there a way I can show graphs according to the chosen variable…?