CLASS DateScale EXTENDS LinearScale (Defined in: jpgraph_date.php : 49)

DateScale | LinearScale
AdjustForDST() SetDateAlign() SetDateFormat() SetTimeAlign() |

Class usage and Overview
Module used to create a date/time X-axis scale

Class Methods

function AdjustForDST($aFlg)

Argument | Default | Description
--- | --- | ---
$aFlg | true | No description available

Description
No description available.

function SetDateAlign($aStartAlign,$aEndAlign)
Specify start and end date alignment for the scale

Argument | Default | Description
--- | --- | ---
$aStartAlign |  | Start alignment
$aEndAlign | false | End alignment

Description
Specify start and end date alignment for the scale Possible values are

1. Alignment on a day basis
   - DAYADJ_1, Align on the start of a day
   - DAYADJ_7, Align on the start of a week
   - DAYADJ_WEEK, Synonym to DAYADJ_7
2. Alignment on a monthly basis
   - MONTHADJ_1, Align on a month start
   - MONTHADJ_6, Align on the start of halfyear
3. Alignment on a yearly basis
   - YEARADJ_1, Align on a year
   - YEARADJ_2, Align on a bi-yearly basis
   - YEARADJ_5, Align on a 5 year basis

See also
DateScale::SetTimeAlign

Example

$graph->xaxis->scale->SetDateAlign(DAYADJ_1);

function SetDateFormat($aFormat)
// Overrides the automatic determined date format. Must be a valid date() format string

Argument | Default | Description
--- | --- | ---
$aFormat |  | No description available

Description
No description available.

function SetTimeAlign($aStartAlign,$aEndAlign)
Specify start and end date alignment for the scale

Argument | Default | Description
--- | --- | ---
$aStartAlign |  | Start time alignment
$aEndAlign | false | End time alignment

Description
Specify the start and end alignment with the time granularity. For date granularity see SetDateAlign(). Note that only one of SetDateAlign() and SetTimeAlign() can be used. For start and end alignment the following values are valid

1. Alignment on seconds
   - MINADJ_1, Align on a single second (This is the lowest resolution)
   - MINADJ_5, Align on the nearest 5 seconds
   - MINADJ_10, Align on the nearest 10 seconds
   - MINADJ_15, Align on the nearest 15 seconds
   - MINADJ_30, Align on the nearest 30 seconds
2. Alignment on minutes
   - MINADJ_1, Align to the nearest minute
   - MINADJ_5, Align on the nearest 5 minutes
   - MINADJ_10, Align on the nearest 10 minutes
   - MINADJ_15, Align on the nearest 15 minutes
   - MINADJ_30, Align on the nearest 30 minutes
3. Alignment on hours
   - HOURADJ_1, Align to the nearest hour
   - HOURADJ_2, Align to the nearest two hour
   - HOURADJ_3, Align to the nearest three hour
   - HOURADJ_4, Align to the nearest four hour
   - HOURADJ_6, Align to the nearest six hour
   - HOURADJ_12, Align to the nearest tolw hour

See also
DateScale::SetDateAlign

Example

$graph->xaxis->scale->SetTimeAlign(MINADJ_15);