Fix graph legend when data is missing.