本文整理汇总了PHP中Chart::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Chart::__construct方法的具体用法?PHP Chart::__construct怎么用?PHP Chart::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chart
的用法示例。
在下文中一共展示了Chart::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @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);
}
示例2: __construct
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);
}
示例3: __construct
/**
* 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);
}
示例4:
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);
}
示例5: __construct
public function __construct()
{
parent::__construct();
$this->set_options(\Config::get('visualization.chart.geomap', array()));
}
示例6: __construct
public function __construct($chartLabel)
{
parent::__construct($chartLabel);
$this->defaults = array_merge($this->defaults, array('is3D', 'slices', 'pieSliceBorderColor', 'pieSliceText', 'pieSliceTextStyle', 'pieStartAngle', 'reverseCategories', 'sliceVisibilityThreshold', 'pieResidueSliceColor', 'pieResidueSliceLabel'));
}
示例7: __construct
public function __construct($chartLabel)
{
parent::__construct($chartLabel);
$this->defaults = array_merge($this->defaults, array('curveType', 'focusTarget', 'hAxis', 'isHtml', 'interpolateNulls', 'lineWidth', 'pointSize', 'vAxes', 'vAxis'));
}
示例8: Color
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];
}
示例9: __construct
public function __construct($type, $width, $height)
{
parent::__construct($type, $width, $height);
$this->setScale(0, 100);
}
示例10: __construct
public function __construct($chartLabel)
{
parent::__construct($chartLabel);
$this->defaults = array_merge($this->defaults, array('axisTitlesPosition', 'barGroupWidth', 'focusTarget', 'hAxis', 'isHtml', 'vAxes', 'vAxis'));
}
示例11:
/**
*
* @param type $width
* @param type $height
*/
function __construct($width, $height)
{
parent::__construct($width, $height);
}
示例12: __construct
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');
}
示例13: array
/**
* 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);
}