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


PHP JpGRaphError类代码示例

本文整理汇总了PHP中JpGRaphError的典型用法代码示例。如果您正苦于以下问题:PHP JpGRaphError类的具体用法?PHP JpGRaphError怎么用?PHP JpGRaphError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: StrokeAxis

 function StrokeAxis($aStrokeLabels = true)
 {
     if ($aStrokeLabels) {
         $this->StrokeAxisLabelBackground();
     }
     // Stroke axis
     if ($this->iAxisStyle != AXSTYLE_SIMPLE) {
         switch ($this->iAxisStyle) {
             case AXSTYLE_BOXIN:
                 $toppos = SIDE_DOWN;
                 $bottompos = SIDE_UP;
                 $leftpos = SIDE_RIGHT;
                 $rightpos = SIDE_LEFT;
                 break;
             case AXSTYLE_BOXOUT:
                 $toppos = SIDE_UP;
                 $bottompos = SIDE_DOWN;
                 $leftpos = SIDE_LEFT;
                 $rightpos = SIDE_RIGHT;
                 break;
             case AXSTYLE_YBOXIN:
                 $toppos = FALSE;
                 $bottompos = SIDE_UP;
                 $leftpos = SIDE_RIGHT;
                 $rightpos = SIDE_LEFT;
                 break;
             case AXSTYLE_YBOXOUT:
                 $toppos = FALSE;
                 $bottompos = SIDE_DOWN;
                 $leftpos = SIDE_LEFT;
                 $rightpos = SIDE_RIGHT;
                 break;
             default:
                 JpGRaphError::RaiseL(25036, $this->iAxisStyle);
                 //('Unknown AxisStyle() : '.$this->iAxisStyle);
                 break;
         }
         // By default we hide the first label so it doesn't cross the
         // Y-axis in case the positon hasn't been set by the user.
         // However, if we use a box we always want the first value
         // displayed so we make sure it will be displayed.
         $this->xscale->ticks->SupressFirst(false);
         // Now draw the bottom X-axis
         $this->xaxis->SetPos('min');
         $this->xaxis->SetLabelSide(SIDE_DOWN);
         $this->xaxis->scale->ticks->SetSide($bottompos);
         $this->xaxis->Stroke($this->yscale, $aStrokeLabels);
         if ($toppos !== FALSE) {
             // We also want a top X-axis
             $this->xaxis = $this->xaxis;
             $this->xaxis->SetPos('max');
             $this->xaxis->SetLabelSide(SIDE_UP);
             // No title for the top X-axis
             if ($aStrokeLabels) {
                 $this->xaxis->title->Set('');
             }
             $this->xaxis->scale->ticks->SetSide($toppos);
             $this->xaxis->Stroke($this->yscale, $aStrokeLabels);
         }
         // Stroke the left Y-axis
         $this->yaxis->SetPos('min');
         $this->yaxis->SetLabelSide(SIDE_LEFT);
         $this->yaxis->scale->ticks->SetSide($leftpos);
         $this->yaxis->Stroke($this->xscale, $aStrokeLabels);
         // Stroke the  right Y-axis
         $this->yaxis->SetPos('max');
         // No title for the right side
         if ($aStrokeLabels) {
             $this->yaxis->title->Set('');
         }
         $this->yaxis->SetLabelSide(SIDE_RIGHT);
         $this->yaxis->scale->ticks->SetSide($rightpos);
         $this->yaxis->Stroke($this->xscale, $aStrokeLabels);
     } else {
         $this->xaxis->Stroke($this->yscale, $aStrokeLabels);
         $this->yaxis->Stroke($this->xscale, $aStrokeLabels);
     }
 }
开发者ID:nbgmaster,项目名称:happify,代码行数:78,代码来源:jpgraph.php

示例2: StrokeAxis

 function StrokeAxis()
 {
     // Stroke axis
     if ($this->iAxisStyle != AXSTYLE_SIMPLE) {
         switch ($this->iAxisStyle) {
             case AXSTYLE_BOXIN:
                 $toppos = SIDE_DOWN;
                 $bottompos = SIDE_UP;
                 $leftpos = SIDE_RIGHT;
                 $rightpos = SIDE_LEFT;
                 break;
             case AXSTYLE_BOXOUT:
                 $toppos = SIDE_UP;
                 $bottompos = SIDE_DOWN;
                 $leftpos = SIDE_LEFT;
                 $rightpos = SIDE_RIGHT;
                 break;
             case AXSTYLE_YBOXIN:
                 $toppos = -100;
                 $bottompos = SIDE_UP;
                 $leftpos = SIDE_RIGHT;
                 $rightpos = SIDE_LEFT;
                 break;
             case AXSTYLE_YBOXOUT:
                 $toppos = -100;
                 $bottompos = SIDE_DOWN;
                 $leftpos = SIDE_LEFT;
                 $rightpos = SIDE_RIGHT;
                 break;
             default:
                 JpGRaphError::Raise('Unknown AxisStyle() : ' . $this->iAxisStyle);
                 break;
         }
         $this->xaxis->SetPos('min');
         // By default we hide the first label so it doesn't cross the
         // Y-axis in case the positon hasn't been set by the user.
         // However, if we use a box we always want the first value
         // displayed so we make sure it will be displayed.
         $this->xscale->ticks->SupressFirst(false);
         $this->xaxis->SetLabelSide(SIDE_DOWN);
         $this->xaxis->scale->ticks->SetSide($bottompos);
         $this->xaxis->Stroke($this->yscale);
         if ($toppos != -100) {
             // To avoid side effects we work on a new copy
             $maxis = $this->xaxis;
             $maxis->SetPos('max');
             $maxis->SetLabelSide(SIDE_UP);
             $maxis->SetLabelMargin(7);
             $this->xaxis->scale->ticks->SetSide($toppos);
             $maxis->Stroke($this->yscale);
         }
         $this->yaxis->SetPos('min');
         $this->yaxis->SetLabelMargin(10);
         $this->yaxis->SetLabelSide(SIDE_LEFT);
         $this->yaxis->scale->ticks->SetSide($leftpos);
         $this->yaxis->Stroke($this->xscale);
         $myaxis = $this->yaxis;
         $myaxis->SetPos('max');
         $myaxis->SetLabelMargin(10);
         $myaxis->SetLabelSide(SIDE_RIGHT);
         $myaxis->title->Set('');
         $myaxis->scale->ticks->SetSide($rightpos);
         $myaxis->Stroke($this->xscale);
     } else {
         $this->xaxis->Stroke($this->yscale);
         $this->yaxis->Stroke($this->xscale);
     }
 }
开发者ID:hostellerie,项目名称:nexpro,代码行数:68,代码来源:jpgraph.php

示例3: StrokeAxis

 function StrokeAxis($aStrokeLabels = true)
 {
     if ($aStrokeLabels) {
         $this->StrokeAxisLabelBackground();
     }
     if ($this->iAxisStyle != AXSTYLE_SIMPLE) {
         switch ($this->iAxisStyle) {
             case AXSTYLE_BOXIN:
                 $toppos = SIDE_DOWN;
                 $bottompos = SIDE_UP;
                 $leftpos = SIDE_RIGHT;
                 $rightpos = SIDE_LEFT;
                 break;
             case AXSTYLE_BOXOUT:
                 $toppos = SIDE_UP;
                 $bottompos = SIDE_DOWN;
                 $leftpos = SIDE_LEFT;
                 $rightpos = SIDE_RIGHT;
                 break;
             case AXSTYLE_YBOXIN:
                 $toppos = -100;
                 $bottompos = SIDE_UP;
                 $leftpos = SIDE_RIGHT;
                 $rightpos = SIDE_LEFT;
                 break;
             case AXSTYLE_YBOXOUT:
                 $toppos = -100;
                 $bottompos = SIDE_DOWN;
                 $leftpos = SIDE_LEFT;
                 $rightpos = SIDE_RIGHT;
                 break;
             default:
                 JpGRaphError::RaiseL(25036, $this->iAxisStyle);
                 break;
         }
         $this->xaxis->SetPos('min');
         $this->xscale->ticks->SupressFirst(false);
         $this->xaxis->SetLabelSide(SIDE_DOWN);
         $this->xaxis->scale->ticks->SetSide($bottompos);
         $this->xaxis->Stroke($this->yscale);
         if ($toppos != -100) {
             $maxis = $this->xaxis;
             $maxis->SetPos('max');
             $maxis->SetLabelSide(SIDE_UP);
             $maxis->SetLabelMargin(7);
             $this->xaxis->scale->ticks->SetSide($toppos);
             $maxis->Stroke($this->yscale);
         }
         $this->yaxis->SetPos('min');
         $this->yaxis->SetLabelMargin(10);
         $this->yaxis->SetLabelSide(SIDE_LEFT);
         $this->yaxis->scale->ticks->SetSide($leftpos);
         $this->yaxis->Stroke($this->xscale);
         $myaxis = $this->yaxis;
         $myaxis->SetPos('max');
         $myaxis->SetLabelMargin(10);
         $myaxis->SetLabelSide(SIDE_RIGHT);
         $myaxis->title->Set('');
         $myaxis->scale->ticks->SetSide($rightpos);
         $myaxis->Stroke($this->xscale);
     } else {
         $this->xaxis->Stroke($this->yscale, $aStrokeLabels);
         $this->yaxis->Stroke($this->xscale, $aStrokeLabels);
     }
 }
开发者ID:natanoj,项目名称:nuBuilderPro,代码行数:65,代码来源:jpgraph.php


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