Exemple #1
0
 function SetY2Scale($aAxisType = 'lin', $aY2Min = 1, $aY2Max = 1)
 {
     if ($aAxisType == 'lin') {
         $this->y2scale = new LinearScale($aY2Min, $aY2Max);
     } elseif ($aAxisType == 'int') {
         $this->y2scale = new LinearScale($aY2Min, $aY2Max);
         $this->y2scale->SetIntScale();
     } elseif ($aAxisType == 'log') {
         $this->y2scale = new LogScale($aY2Min, $aY2Max);
     } else {
         JpGraphError::RaiseL(25023, $aAxisType);
         //("JpGraph: Unsupported Y2 axis type: $aAxisType\nMust be one of (lin,log,int)");
     }
     $this->y2axis = new Axis($this->img, $this->y2scale);
     $this->y2axis->scale->ticks->SetDirection(SIDE_LEFT);
     $this->y2axis->SetLabelSide(SIDE_RIGHT);
     $this->y2axis->SetPos('max');
     $this->y2axis->SetTitleSide(SIDE_RIGHT);
     // Deafult position is the max x-value
     $this->y2grid = new Grid($this->y2axis);
     if ($this->graph_theme) {
         $this->graph_theme->ApplyGraph($this);
     }
 }