diagram component lifecycle