Now that I see your table & charts I see you posted the same question a few days ago Use Drop Down Menu to reference different… - Apple Community . I thought I had replied to that one but I guess I forgot to hit "Post".
I do not know what that spreadsheet is doing in Excel. Maybe it is using the normal tools of the spreadsheet, maybe it is using VBA to change what you see or some of the work of making things look good. I'll stick with how to do it using the normal tools in a spreadsheet.
A chart gets its data from a table you specify when you create the chart. If you want that chart to plot different data in an automatic-like way, you change the data in the table. That can be done using a pop up menu. The real problem is making the chart look good when the data changes. Often some manual tweaking is required to get the right number of gridlines and min-max axis values and to add "names" to the axes and arrange the legend, etc. Mot of that cannot be done automatically and you'll have to take whatever Numbers gives you.
Lets say Table1::A1 has a pop up menu with the values Data1 and Data2
Table 2 has the values (X&Y data and the header labels) for Data1
Table 3 has the values for Data2
Table 4 will be as large as or larger than those tables. You will make the chart from Table 4.
Table 4::A1 =IFERROR(IFS(Table 1::$A$1="Data1",Table 2::A1,Table 1::$A$1="Data 2",Table 3::A1,TRUE,""),"")
Copy/paste that formula to the rest of Table 4
Make your chart from all of Table 4
Set the chart so it does not plot hidden data
Put a filter on Table 4 to hide empty "" rows
Use the pop up menu to select which set of data to plot