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

Graphics.Rendering.Chart.Axis.Time

Contents

Description

Calculate and render time axes

Synopsis

# Documentation

type TimeSeq = UTCTime -> ([UTCTime], [UTCTime]) Source #

TimeSeq is a (potentially infinite) set of times. When passed a reference time, the function returns a a pair of lists. The first contains all times in the set less than the reference time in decreasing order. The second contains all times in the set greater than or equal to the reference time, in increasing order.

How to display a time

Constructors

 UnderTicks BetweenTicks

Instances

 Source # MethodsshowList :: [TimeLabelAlignment] -> ShowS #

class TimeValue t where Source #

A typeclass abstracting the functions we need to be able to plot against an axis of time type d.

Minimal complete definition

Methods

utctimeFromTV :: t -> UTCTime Source #

Instances

 Source # Methods Source # Methods Source # Methods

Arguments

 :: TimeValue t => TimeSeq Set the minor ticks, and the final range will be aligned to its elements. -> TimeSeq Set the labels and grid. -> TimeLabelFn -> TimeLabelAlignment -> TimeSeq Set the second line of labels. -> TimeLabelFn Format t for labels. -> TimeLabelAlignment -> AxisFn t

Create an AxisFn to for a time axis.

The values to be plotted against this axis can be created with doubleFromLocalTime.

Implementation detail: PlotValue constraint is needed to use vmap.

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 doubleFromTimeValue.

A TimeSeq for calendar days.

A TimeSeq for calendar months.

A TimeSeq for calendar years.

# Orphan instances

 Source # Methods Source # Methods Source # Methods