You are here

function pDraw::isValidLabel in Visitors 7.2

Same name and namespace in other branches
  1. 7 pChart/class/pDraw.class.php \pDraw::isValidLabel()
1 call to pDraw::isValidLabel()
pDraw::drawScale in pChart/class/pDraw.class.php

File

pChart/class/pDraw.class.php, line 2487

Class

pDraw

Code

function isValidLabel($Value, $LastValue, $LabelingMethod, $ID, $LabelSkip) {
  if ($LabelingMethod == LABELING_DIFFERENT && $Value != $LastValue) {
    return TRUE;
  }
  if ($LabelingMethod == LABELING_DIFFERENT && $Value == $LastValue) {
    return FALSE;
  }
  if ($LabelingMethod == LABELING_ALL && $LabelSkip == 0) {
    return TRUE;
  }
  if ($LabelingMethod == LABELING_ALL && ($ID + $LabelSkip) % ($LabelSkip + 1) != 1) {
    return FALSE;
  }
  return TRUE;
}