Add graph output to existing classes.