本文整理汇总了PHP中Axis::SetTitleSide方法的典型用法代码示例。如果您正苦于以下问题:PHP Axis::SetTitleSide方法的具体用法?PHP Axis::SetTitleSide怎么用?PHP Axis::SetTitleSide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axis
的用法示例。
在下文中一共展示了Axis::SetTitleSide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doAutoscaleXAxis
//.........这里部分代码省略.........
$max = max($max, $p->numpoints - 1);
} else {
$max = max($max, $p->numpoints);
}
} else {
if (empty($p->barcenter)) {
$max = max($max, $p->numpoints - 1);
} else {
$max = max($max, $p->numpoints);
}
}
}
$min = 0;
if ($this->y2axis != null) {
foreach ($this->y2plots as $p) {
$max = max($max, $p->numpoints - 1);
}
}
$n = count($this->ynaxis);
for ($i = 0; $i < $n; ++$i) {
if ($this->ynaxis[$i] != null) {
foreach ($this->ynplots[$i] as $p) {
$max = max($max, $p->numpoints - 1);
}
}
}
$this->xscale->Update($this->img, $min, $max);
$this->xscale->ticks->Set($this->xaxis->tick_step, 1);
$this->xscale->ticks->SupressMinorTickMarks();
} else {
list($min, $max) = $this->GetXMinMax();
$lres = $this->GetLinesXMinMax($this->lines);
if ($lres) {
list($linmin, $linmax) = $lres;
$min = min($min, $linmin);
$max = max($max, $linmax);
}
$lres = $this->GetLinesXMinMax($this->y2lines);
if ($lres) {
list($linmin, $linmax) = $lres;
$min = min($min, $linmin);
$max = max($max, $linmax);
}
$tres = $this->GetTextsXMinMax();
if ($tres) {
list($tmin, $tmax) = $tres;
$min = min($min, $tmin);
$max = max($max, $tmax);
}
$tres = $this->GetTextsXMinMax(true);
if ($tres) {
list($tmin, $tmax) = $tres;
$min = min($min, $tmin);
$max = max($max, $tmax);
}
$this->xscale->AutoScale($this->img, $min, $max, round($this->img->plotwidth / $this->xtick_factor));
}
//Adjust position of y-axis and y2-axis to minimum/maximum of x-scale
if (!is_numeric($this->yaxis->pos) && !is_string($this->yaxis->pos)) {
$this->yaxis->SetPos($this->xscale->GetMinVal());
}
} elseif ($this->xscale->IsSpecified() && ($this->xscale->auto_ticks || !$this->xscale->ticks->IsSpecified())) {
// The tick calculation will use the user suplied min/max values to determine
// the ticks. If auto_ticks is false the exact user specifed min and max
// values will be used for the scale.
// If auto_ticks is true then the scale might be slightly adjusted
// so that the min and max values falls on an even major step.
$min = $this->xscale->scale[0];
$max = $this->xscale->scale[1];
$this->xscale->AutoScale($this->img, $min, $max, round($this->img->plotwidth / $this->xtick_factor), false);
// Now make sure we show enough precision to accurate display the
// labels. If this is not done then the user might end up with
// a scale that might actually start with, say 13.5, butdue to rounding
// the scale label will ony show 14.
if (abs(floor($min) - $min) > 0) {
// If the user has set a format then we bail out
if ($this->xscale->ticks->label_formatstr == '' && $this->xscale->ticks->label_dateformatstr == '') {
$this->xscale->ticks->precision = abs(floor(log10(abs(floor($min) - $min)))) + 1;
}
}
}
// Position the optional Y2 and Yn axis to the rightmost position of the x-axis
if ($this->y2axis != null) {
if (!is_numeric($this->y2axis->pos) && !is_string($this->y2axis->pos)) {
$this->y2axis->SetPos($this->xscale->GetMaxVal());
}
$this->y2axis->SetTitleSide(SIDE_RIGHT);
}
$n = count($this->ynaxis);
$nY2adj = $this->y2axis != null ? $this->iYAxisDeltaPos : 0;
for ($i = 0; $i < $n; ++$i) {
if ($this->ynaxis[$i] != null) {
if (!is_numeric($this->ynaxis[$i]->pos) && !is_string($this->ynaxis[$i]->pos)) {
$this->ynaxis[$i]->SetPos($this->xscale->GetMaxVal());
$this->ynaxis[$i]->SetPosAbsDelta($i * $this->iYAxisDeltaPos + $nY2adj);
}
$this->ynaxis[$i]->SetTitleSide(SIDE_RIGHT);
}
}
}