You do need to 'do all the average calculations,' as Numbers wil graph only the data you supply to the chart.
Excluding the -9 values from the calculations requires switching from AVERGEIF, which handles a single condition, to AVERAGEIFS, which allows specifying multiple conditions, all of which must be TRUE for the datum to be included in the calculation.
For the case described, the formula would be
=AVERAGEIFS(J,C,"=1",J,"<>-9")
If the formula is on a separate sheet, you will need to add the sheet name and table name to each cell reference in the formula:
=AVERAGEIFS(finale 1::tableau 1::J,finale 1::tableau 1::C,"=1",finale 1::tableau 1::J,"<>-9")
(Replace the commas in my version with semi colons to fit your localization.)
Regards,
Barry
Note: No time to test it this morning.
B