Created chart logic.