Changeset 85 for trunk/Graph.php


Ignore:
Timestamp:
Jan 20, 2018, 11:49:24 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Not working time marks for long time span graphs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Graph.php

    r71 r85  
    138138    $TimeRange = $EndTime - $StartTime;
    139139    $TimeMarksIndex = 0;
    140     while(($TimeRange / $TimeMarks[$TimeMarksIndex]) > 1) $TimeMarksIndex += 1;
     140    while((($TimeRange / $TimeMarks[$TimeMarksIndex]) > 1) and ($TimeMarksIndex < (count($TimeMarks) - 1)))
     141      $TimeMarksIndex += 1;
    141142    if($TimeMarksIndex < 2) $TimeMarksIndex = 2;
    142143    $MajorTimeMarks = $TimeMarks[$TimeMarksIndex - 1];
Note: See TracChangeset for help on using the changeset viewer.