You are here

function pData::initScatterSerie in Visitors 7

Same name and namespace in other branches
  1. 7.2 pChart/class/pData.class.php \pData::initScatterSerie()
1 call to pData::initScatterSerie()
pData::setScatterSerie in pChart/class/pData.class.php

File

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;
  }
}