function pData::initScatterSerie

5.x pData.class.php pData::initScatterSerie($ID)
1 call to pData::initScatterSerie()
pData::setScatterSerie in inc/pchart/pchart/class/pData.class.php

File

inc/pchart/pchart/class/pData.class.php, line 563

Class

pData

Code

function initScatterSerie($ID) 
 {
  if (isset($this->Data ["ScatterSeries"][$ID])) {
    return (0);
  }

  $this->Data ["ScatterSeries"][$ID]["Description"] = "Scatter " . $ID;
  $this->Data ["ScatterSeries"][$ID]["isDrawable"] = TRUE;
  $this->Data ["ScatterSeries"][$ID]["Picture"] = NULL;
  $this->Data ["ScatterSeries"][$ID]["Ticks"] = 0;
  $this->Data ["ScatterSeries"][$ID]["Weight"] = 0;

  if (isset($this->Palette [$ID])) {
    $this->Data ["ScatterSeries"][$ID]["Color"] = $this->Palette [$ID];
  }
  else 
   {
    $this->Data ["ScatterSeries"][$ID]["Color"]["R"] = rand(0, 255);
    $this->Data ["ScatterSeries"][$ID]["Color"]["G"] = rand(0, 255);
    $this->Data ["ScatterSeries"][$ID]["Color"]["B"] = rand(0, 255);
    $this->Data ["ScatterSeries"][$ID]["Color"]["Alpha"] = 100;
  }
}