Example #1
0
 /**
  * @param string $title   The main title of the error. eg: "Unable to render the chart"
  * @param string $msg     The error message full of details
  * @param int    $aWidth  The width of the image (this forces the text to wrap) 
  *                        /!\ A too small width may lead to a jpgraph error
  * @param int    $aHeight The height of the image 
  *                        /!\ A too small width may lead to a jpgraph error
  */
 public function __construct($title, $msg, $aWidth = 600, $aHeight = 400)
 {
     parent::__construct($aWidth, $aHeight);
     $this->img_width = $aWidth;
     $this->jpgraph_instance->InitFrame();
     $padding = 10;
     $graph_title = $this->addTextToGraph($title, $padding, $padding, FS_BOLD, 12, $aWidth);
     $height = $graph_title->GetTextHeight($this->jpgraph_instance->img);
     $text = $this->addTextToGraph($msg, $padding, 2 * $padding + $height, FS_NORMAL, 8, $aWidth);
 }
Example #2
0
 public function __construct($width, $height)
 {
     if ($width > self::MAX_WIDTH) {
         throw new InvalidArgumentException(sprintf('Max width for Map Chart is %d.', self::MAX_WIDTH));
     }
     if ($height > self::MAX_HEIGHT) {
         throw new InvalidArgumentException(sprintf('Max height for Map Chart is %d.', self::MAX_HEIGHT));
     }
     parent::__construct('t', $width, $height);
 }
Example #3
0
 /**
  * Constructor
  * 
  * @param int    $aWidth      Default is 0
  * @param int    $aHeight     Default is 0
  * @param string $aCachedName Default is ""
  * @param int    $aTimeOut    Default is 0
  * @param bool   $aInline     Default is true
  * 
  * @return void
  */
 public function __construct($aWidth = 0, $aHeight = 0, $aCachedName = "", $aTimeOut = 0, $aInline = true)
 {
     parent::__construct($aWidth, $aHeight, $aCachedName, $aTimeOut, $aInline);
     $header_color = $GLOBALS['HTML']->getGanttHeaderColor();
     $this->scale->year->grid->SetColor($this->getMainColor());
     $this->scale->year->grid->Show(true);
     $this->scale->year->SetBackgroundColor($header_color);
     $this->scale->year->SetFont($this->getFont(), FS_NORMAL, 8);
     $this->scale->month->grid->SetColor($this->getMainColor());
     $this->scale->month->grid->Show(true);
     $this->scale->month->SetBackgroundColor($header_color);
     $this->scale->month->SetFont($this->getFont(), FS_NORMAL, 8);
     $this->scale->week->grid->SetColor($this->getMainColor());
     $this->scale->week->SetFont($this->getFont(), FS_NORMAL, 8);
     $this->scale->day->grid->SetColor($this->getMainColor());
     $this->scale->day->SetFont($this->getFont(), FS_NORMAL, 6);
     $this->scale->actinfo->SetBackgroundColor($header_color);
     $this->scale->actinfo->SetFont($this->getFont(), FS_NORMAL, 8);
     $this->scale->actinfo->vgrid->SetColor($header_color);
 }
 function __construct($_cid, $_name, $_canvas, $_type, $_left, $_top, $_depth, $_height, $_width, $_datainfo, $_note)
 {
     parent::__construct($_cid, $_name, $_canvas, $_type, $_left, $_top, $_depth, $_height, $_width, $_datainfo, $_note);
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     $this->set_options(\Config::get('visualization.chart.geomap', array()));
 }
 public function __construct($chartLabel)
 {
     parent::__construct($chartLabel);
     $this->defaults = array_merge($this->defaults, array('is3D', 'slices', 'pieSliceBorderColor', 'pieSliceText', 'pieSliceTextStyle', 'pieStartAngle', 'reverseCategories', 'sliceVisibilityThreshold', 'pieResidueSliceColor', 'pieResidueSliceLabel'));
 }
 public function __construct($chartLabel)
 {
     parent::__construct($chartLabel);
     $this->defaults = array_merge($this->defaults, array('curveType', 'focusTarget', 'hAxis', 'isHtml', 'interpolateNulls', 'lineWidth', 'pointSize', 'vAxes', 'vAxis'));
 }
Example #8
0
 function __construct($bound)
 {
     parent::__construct($bound);
     $this->axis = ['bgcolor' => new Color(255, 255, 255, 0), 'fgcolor' => Color::getDefault(), 'font_x' => Font::getDefault(), 'font_y' => Font::getDefault(), 'visible' => TRUE, 'y_lines' => TRUE];
 }
Example #9
0
 public function __construct($type, $width, $height)
 {
     parent::__construct($type, $width, $height);
     $this->setScale(0, 100);
 }
 public function __construct($chartLabel)
 {
     parent::__construct($chartLabel);
     $this->defaults = array_merge($this->defaults, array('axisTitlesPosition', 'barGroupWidth', 'focusTarget', 'hAxis', 'isHtml', 'vAxes', 'vAxis'));
 }
Example #11
0
 /**
  *
  * @param type $width
  * @param type $height 
  */
 function __construct($width, $height)
 {
     parent::__construct($width, $height);
 }
 public function __construct($chartLabel)
 {
     parent::__construct($chartLabel);
     $this->defaults = array('headerColor', 'headerHeight', 'headerHighlightColor', 'maxColor', 'maxDepth', 'maxHighlightColor', 'maxPostDepth', 'maxColorValue', 'midColor', 'midHighlightColor', 'minColor', 'minHighlightColor', 'minColorValue', 'noColor', 'noHighlightColor', 'showScale', 'showTooltips', 'fontColor', 'fontFamily', 'fontSize');
 }
 public function __construct($chartLabel)
 {
     parent::__construct($chartLabel);
     $this->defaults = array_merge($this->defaults, array('colorAxis', 'datalessRegionColor', 'displayMode', 'enableRegionInteractivity', 'keepAspectRatio', 'region', 'magnifyingGlass', 'markerOpacity', 'resolution', 'sizeAxis'));
 }
Example #14
0
 /**
  * Constructor; creates a new pie chart
  * 
  * @param type $width
  * @param type $height 
  */
 function __construct($width, $height)
 {
     $this->setProperties(array('legend' => true, 'style' => PieChart::STYLE_3D, 'palette' => array('#FF7777', '#77FF77', '#7777FF', '#FFFF77', '#77FFFF', '#FF77FF', '#FFAAFF')));
     parent::__construct($width, $height);
 }
 public function __construct($chartLabel)
 {
     parent::__construct($chartLabel);
     $this->defaults = array_merge($this->defaults, array('areaOpacity', 'events', 'hAxis', 'isHtml', 'interpolateNulls', 'lineWidth', 'pointSize', 'vAxes', 'vAxis'));
 }