Example #1
0
 /**
  * @depends testTextStyleConstructorValuesAssignment
  */
 public function testGetValuesWithTextStyleConfigObject()
 {
     $textStyle = new TextStyle(array('color' => 'blue', 'fontName' => 'Arial', 'fontSize' => 16));
     $textStyleArr = $textStyle->getValues();
     $this->assertTrue(is_array($textStyleArr));
     $this->assertEquals('blue', $textStyleArr['color']);
     $this->assertEquals('Arial', $textStyleArr['fontName']);
     $this->assertEquals(16, $textStyleArr['fontSize']);
 }
Example #2
0
 /**
  * Sets the text style of the tooltip.
  *
  * @param  TextStyle $textStyle A valid TextStyle object.
  * @return Tooltip
  */
 public function textStyle(TextStyle $textStyle)
 {
     $this->textStyle = $textStyle->getValues();
     return $this;
 }
Example #3
0
 /**
  * An object that specifies the slice text style. create a new textStyle()
  * object, set the values then pass it to this function or to the constructor.
  *
  * @param  TextStyle          $textStyle
  * @throws InvalidConfigValue
  * @return PieChart
  */
 public function pieSliceTextStyle(TextStyle $textStyle)
 {
     $this->addOption(array('pieSliceTextStyle' => $textStyle->getValues()));
     return $this;
 }