當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。