Hi,
I am not sure about your data source. You may pass the value of Goal type to a hidden label (in your canvas somewhere) or excel cell (if it is excel data source).
Create two charts as you needed and align them on top of each other. Later, set it visibility as per the value of hidden label.
Regards
Angad