Chart-0.16: A library for generating 2D Charts and Plots

Safe Haskell | None

Graphics.Rendering.Chart.Axis.LocalTime

Description

Calculate and render time axes

Synopsis

- timeAxis :: TimeSeq -> TimeSeq -> TimeLabelFn -> TimeLabelAlignment -> TimeSeq -> TimeLabelFn -> TimeLabelAlignment -> AxisFn LocalTime
- autoTimeAxis :: AxisFn LocalTime
- days :: TimeSeq
- months :: TimeSeq
- years :: TimeSeq

# Documentation

timeAxis :: TimeSeq -> TimeSeq -> TimeLabelFn -> TimeLabelAlignment -> TimeSeq -> TimeLabelFn -> TimeLabelAlignment -> AxisFn LocalTime Source

Create an `AxisFn` to for a time axis. The first `TimeSeq` sets the minor ticks, and the ultimate range will be aligned to its elements. The second `TimeSeq` sets the labels and grid. The third `TimeSeq` sets the second line of labels. The `TimeLabelFn` is used to format LocalTimes for labels. The values to be plotted against this axis can be created with `doubleFromLocalTime`.

autoTimeAxis :: AxisFn LocalTime Source

Automatically choose a suitable time axis, based upon the time range of data. The values to be plotted against this axis can be created with `doubleFromLocalTime`.

days :: TimeSeqSource

A `TimeSeq` for calendar days.

months :: TimeSeqSource

A `TimeSeq` for calendar months.

years :: TimeSeqSource

A `TimeSeq` for calendar years.