code: public function setPosition($position)
      {
          if (!in_array($position, self::$positionXLref)) {
              return false;
          }
  
          $this->position = $position;
  
          return true;
      }
docs: Get legend position using an excel string value.
  
  @param string $position see self::POSITION_*
  
  @return bool