Fix add class for graduated renderer. Fix #7726