The time axis in a graph is a horizontal axis that shows date or time information.
The graph plots time data along the O1Axis
component. The O1TickLabel
component represents the time labels, and the O1MajorTick
element
represents the vertical grid lines in a graph that has a time axis. A time axis
automatically displays time data in an appropriate way. For example, in a graph
whose group labels include months from more than one year, a second layer of
labels identifies the year, as shown in the following graph.
Notice that the O1MajorTick
appears at the year change. The second
layer of date information appears automatically as needed.
The following graph types can have a time axis:
To have the graph display a time axis, you specify the group labels of a graph
as java.sql.Date
objects, in ascending order. The actual data should
be complete and should be in regular intervals. In bar, line, area, and combination
graphs, ensure that the time dimension is the only dimension on the group edge
of the graph. For stock graphs, ensure that the time dimension is the outer
dimension on the edge.
By default, the graph uses the default time zone to display time data. When
you display a time axis in an HTML application, the user of the application
may be in a different time zone. To specify the time zone that the graph uses,
call the setTimeZone
method of the graph.
Specifying Data for a Time Axis
Data Requirements for
Different Kinds of Graphs