当前位置: 首页>>代码示例>>PHP>>正文


PHP Plot::PreStrokeAdjust方法代码示例

本文整理汇总了PHP中Plot::PreStrokeAdjust方法的典型用法代码示例。如果您正苦于以下问题:PHP Plot::PreStrokeAdjust方法的具体用法?PHP Plot::PreStrokeAdjust怎么用?PHP Plot::PreStrokeAdjust使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plot的用法示例。


在下文中一共展示了Plot::PreStrokeAdjust方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PreStrokeAdjust

 function PreStrokeAdjust(&$graph)
 {
     parent::PreStrokeAdjust($graph);
     // If we are using a log Y-scale we want the base to be at the
     // minimum Y-value unless the user have specifically set some other
     // value than the default.
     if (substr($graph->axtype, -3, 3) == "log" && $this->ybase == 0) {
         $this->ybase = $graph->yaxis->scale->GetMinVal();
     }
     // For a "text" X-axis scale we will adjust the
     // display of the bars a little bit.
     if (substr($graph->axtype, 0, 3) == "tex") {
         // Position the ticks between the bars
         $graph->xaxis->scale->ticks->SetXLabelOffset(0.5, 0);
         // Center the bars
         if ($this->align == "center") {
             $graph->SetTextScaleOff(0.5 - $this->width / 2);
         } elseif ($this->align == "right") {
             $graph->SetTextScaleOff(1 - $this->width);
         }
     } else {
         // We only set an absolute width for linear and int scale
         // for text scale the width will be set to a fraction of
         // the majstep width.
         if ($this->abswidth == -1) {
             // Not set
             // set width to a visuable sensible default
             $this->abswidth = $graph->img->plotwidth / (2 * count($this->coords[0]));
         }
     }
 }
开发者ID:vikingkarwur,项目名称:smjgpib,代码行数:31,代码来源:jpgraph_bar.php

示例2: PreStrokeAdjust

 function PreStrokeAdjust(&$graph)
 {
     parent::PreStrokeAdjust($graph);
     if (substr($graph->axtype, -3, 3) == "log" && $this->ybase == 0) {
         $this->ybase = $graph->yaxis->scale->GetMinVal();
     }
     if (substr($graph->axtype, 0, 3) == "tex") {
         $graph->xaxis->scale->ticks->SetXLabelOffset(0.5, 0);
         if ($this->abswidth > -1) {
             $graph->SetTextScaleAbsCenterOff($this->abswidth);
         } else {
             if ($this->align == "center") {
                 $graph->SetTextScaleOff(0.5 - $this->width / 2);
             } elseif ($this->align == "right") {
                 $graph->SetTextScaleOff(1 - $this->width);
             }
         }
     }
 }
开发者ID:natanoj,项目名称:nuBuilderPro,代码行数:19,代码来源:jpgraph_bar.php

示例3: PreStrokeAdjust

 function PreStrokeAdjust(&$graph)
 {
     parent::PreStrokeAdjust($graph);
     // Center each bar within each major tick
     $graph->xaxis->scale->ticks->SetXLabelOffset(0.5);
     $graph->SetTextScaleOff(0.5 - $this->width / 2);
     $graph->xaxis->scale->ticks->SupressTickMarks();
 }
开发者ID:Ethennoob,项目名称:Web,代码行数:8,代码来源:jpgraph_bar.php

示例4: PreStrokeAdjust

 function PreStrokeAdjust(&$graph)
 {
     parent::PreStrokeAdjust($graph);
     // For a "text" X-axis scale we will adjust the
     // display of the bars a little bit.
     if (substr($graph->axtype, 0, 3) == "tex") {
         // Position the ticks between the bars
         $graph->xaxis->scale->ticks->SetXLabelOffset(0.5, 0);
         // Position the labels under each bar in the middle of the
         // major steps.
         $graph->SetTextScaleOff(0.5 - $this->width / 2);
     } else {
         // We only set an absolute width for linear and int scale
         // for text scale the width will be set to a fraction of
         // the majstep width.
         if ($this->abswidth == -1) {
             // Not set
             // set width to a visuable sensible default
             $this->abswidth = $graph->img->plotwidth / (2 * count($this->coords[0]));
         }
     }
 }
开发者ID:ahviplc,项目名称:judgegirl,代码行数:22,代码来源:jpgraph_bar.php


注:本文中的Plot::PreStrokeAdjust方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。