public function testOffsetX()
 {
     $object = new Title();
     $value = rand(0, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\Chart\\Title', $object->setOffsetX());
     $this->assertEquals(0.01, $object->getOffsetX());
     $this->assertInstanceOf('PhpOffice\\PhpPowerpoint\\Shape\\Chart\\Title', $object->setOffsetX($value));
     $this->assertEquals($value, $object->getOffsetX());
 }
 /**
  * @param Title $oTitle
  */
 private function writeTitle(Title $oTitle)
 {
     if ($oTitle->isVisible()) {
         // chart:title
         $this->xmlContent->startElement('chart:title');
         $this->xmlContent->writeAttribute('svg:x', String::numberFormat(CommonDrawing::pixelsToCentimeters($oTitle->getOffsetX()), 3) . 'cm');
         $this->xmlContent->writeAttribute('svg:y', String::numberFormat(CommonDrawing::pixelsToCentimeters($oTitle->getOffsetY()), 3) . 'cm');
         $this->xmlContent->writeAttribute('chart:style-name', 'styleTitle');
         // > text:p
         $this->xmlContent->startElement('text:p');
         $this->xmlContent->text($oTitle->getText());
         // > text:p
         $this->xmlContent->endElement();
         // > chart:title
         $this->xmlContent->endElement();
     }
 }