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

Safe Haskell | None

Graphics.Rendering.Chart.Grid

Description

A container type for values that can be composed by horizonal and vertical layout.

Synopsis

- data Grid a
- type Span = (Int, Int)
- tval :: a -> Grid a
- tspan :: a -> Span -> Grid a
- empty :: Grid a
- nullt :: Grid a
- (.|.) :: Grid a -> Grid a -> Grid a
- (./.) :: Grid a -> Grid a -> Grid a
- above :: Grid a -> Grid a -> Grid a
- aboveN :: [Grid a] -> Grid a
- beside :: Grid a -> Grid a -> Grid a
- besideN :: [Grid a] -> Grid a
- overlay :: Grid a -> Grid a -> Grid a
- width :: Grid a -> Int
- height :: Grid a -> Int
- gridToRenderable :: Grid (Renderable a) -> Renderable a
- weights :: SpaceWeight -> Grid a -> Grid a
- fullRowAbove :: a -> Double -> Grid a -> Grid a
- fullRowBelow :: a -> Double -> Grid a -> Grid a
- fullColLeft :: a -> Double -> Grid a -> Grid a
- fullColRight :: a -> Double -> Grid a -> Grid a
- fullOverlayUnder :: a -> Grid a -> Grid a
- fullOverlayOver :: a -> Grid a -> Grid a

# Documentation

data Grid a Source

Abstract datatype representing a grid.

Instances

Functor Grid |
Show a => Show (Grid a) |
ToRenderable a => ToRenderable (Grid a) |

type Span = (Int, Int)Source

tval :: a -> Grid aSource

A 1x1 grid from a given value, with no extra space.

tspan :: a -> Span -> Grid aSource

A WxH (measured in cells) grid from a given value, with space weight (1,1).

empty :: Grid aSource

A 1x1 empty grid.

nullt :: Grid aSource

A 0x0 empty grid.

(.|.) :: Grid a -> Grid a -> Grid aSource

A synonym for `beside`.

(./.) :: Grid a -> Grid a -> Grid aSource

A synonym for `above`.

above :: Grid a -> Grid a -> Grid aSource

aboveN :: [Grid a] -> Grid aSource

beside :: Grid a -> Grid a -> Grid aSource

besideN :: [Grid a] -> Grid aSource

overlay :: Grid a -> Grid a -> Grid aSource

One grid over the other. The first argument is shallow, the second is deep.

width :: Grid a -> Int Source

height :: Grid a -> Int Source

gridToRenderable :: Grid (Renderable a) -> Renderable aSource

weights :: SpaceWeight -> Grid a -> Grid aSource

Sets the space weight of *every* cell of the grid to given value.

fullRowAbove :: a -> Double -> Grid a -> Grid aSource

A value placed above the grid, occupying 1 row with the same horizontal span as the grid.

fullRowBelow :: a -> Double -> Grid a -> Grid aSource

A value placed below the grid, occupying 1 row with the same horizontal span as the grid.

fullColLeft :: a -> Double -> Grid a -> Grid aSource

A value placed to the left of the grid, occupying 1 column with the same vertical span as the grid.

fullColRight :: a -> Double -> Grid a -> Grid aSource

A value placed to the right of the grid, occupying 1 column with the same vertical span as the grid.

fullOverlayUnder :: a -> Grid a -> Grid aSource

A value placed under a grid, with the same span as the grid.

fullOverlayOver :: a -> Grid a -> Grid aSource

A value placed over a grid, with the same span as the grid.