Refactor portal charts using constructor method