Contents Previous Next

### 9.8.3 Day scale

By default the day scale show the first letter of the week day but it is also posible to format the day scale in a number of different ways. Days can have one of the following scale formats.

- DAYSTYLE_ONELETTER, On letter week day. Example "M"
- DAYSTYLE_LONG, Full week day. Example "Monday"
- DAYSTYLE_LONGDAYDATE1, Day with date. Example "Monday 23 Jun"
- DAYSTYLE_LONGDAYDATE2, Day with date+year. Example "Monday 23 Jun 2003"
- DAYSTYLE_SHORT, Short date. Example "Mon"
- DAYSTYLE_SHORTDAYDATE1, Short date+date. Example "Mon 23/6"
- DAYSTYLE_SHORTDAYDATE2, Short date+date. Example "Mon 23 Jun"
- DAYSTYLE_SHORTDAYDATE3,Short date+date. Example "Mon 23"
- DAYSTYLE_SHORTDATE1, Short date. Example "23/6"
- DAYSTYLE_SHORTDATE2, Short date. Example "23 Jun"
- DAYSTYLE_SHORTDATE3, Short date. Example "Mon 23"
- DAYSTYLE_SHORTDATE4, Short date. Example "23"
- DAYSTYLE_CUSTOM, Custom specified formatting string. Example "M"

The formatting is specified by using the SetStyle() method as in

`$graph ->scale->day-> SetStyle( DAYSTYLE_LONG);`

The graphical formatting possibilities for days allow the possibility to specify a different color for the weekend background and also for the Sunday.

- `SetWeekendColor()`

  Set the background color for weekends. (Defaults to light gray)

- `SetSundayFontColor()`

  The Sunday font color. (Defaults to red)

In addition to this there is also a possibility to choose whether or not the weekend background should be extended vertically down over the plot area. (the default). Since that is a property more of the whole plot this behavior is modified with a call to the method

`UseWeekendBackground()`

of the scale, e.g.

`$graph->scale->UseWeekendBackground(false );`

Contents Previous Next