You are probably better off doing it in Excel but you can do it in Numbers with some effort, if it is a scatter chart.
Top chart is a scatter chart from Table 1, with the problem of broken lines. The lower chart is a scatter chart of tables 2 and 3, both of which have a filter on them hiding empty rows and the chart is set to not show hidden data (the default setting).
Make Tables 2 and 3 as long or longer than Table 1. The screenshot is showing them with a filter turned on. There are more rows than what is shown (and hidden rows in the middle).
Formulas in Table 1 are
A1 =Table 1::A
B1 =IF(Table 1::B≠"",Table 1::B,"")
Copy/paste those to the rest of the cells in their columns
Formulas in Table 3 are
A1 =Table 1::A
B1 =IF(Table 1::C≠"",Table 1::C,"")
Copy/paste to those rest of the cells in their columns
Now that the tables are made
- Create a scatter chart of Table 2
- Choose to not share X values (important to do this step)
- Edit Data References and select the cells in Table 3 to be included in the chart (both columns)
- Click Done
- Choose to have straight connection lines for both series
- Use a quick filter on Tables 2 and 3 to hide blank rows (if that option is presented) and rows that are "".
- I think you will have to go to the format sidebar with the chart selected to change the name of each series so it points to the correct column header.
- That was about it, unless I left something out.
There is a second method where you create two charts then overlay one on top of the other but it can get tedious to align them properly and to keep them aligned.