Ejemplo n.º 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']);
 }
Ejemplo n.º 2
0
 /**
  * An object that specifies the title text style. create a new textStyle()
  * object, set the values then pass it to this function or to the constructor.
  *
  * @uses   TextStyle
  * @param  TextStyle          $ts
  * @throws InvalidConfigValue
  *
  * @return Chart
  */
 public function titleTextStyle(TextStyle $ts)
 {
     return $this->addOption($ts->toArray(__FUNCTION__));
 }
Ejemplo n.º 3
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;
 }
Ejemplo n.º 4
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;
 }
Ejemplo n.º 5
0
 /**
  * Sets the style for the month labels.
  *
  * @param  TextStyle $label
  *
  * @return CalendarChart
  */
 public function monthLabel(TextStyle $label)
 {
     $this->addCalendarOption($label->toArray(__FUNCTION__));
 }