Graphics.Rendering.Chart.Grid

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

Copyright | (c) Tim Docker 2010 2014
License | BSD-style (see chart/COPYRIGHT)
Safe Haskell | None
Language | Haskell98

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)
- type SpaceWeight = (Double, Double)
- 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
- aboveWide :: Grid a -> a -> Grid a
- wideAbove :: a -> Grid a -> Grid a
- tallBeside :: a -> Grid a -> Grid a
- besideTall :: Grid a -> a -> Grid a
- fullOverlayUnder :: a -> Grid a -> Grid a
- fullOverlayOver :: a -> Grid a -> Grid a

# Documentation

data Grid a #

Abstract datatype representing a grid.

#### Instances

Instances details

Functor Grid # |
Instance details Defined in Graphics.Rendering.Chart.Grid Methods fmap :: (a -> b) -> Grid a -> Grid b # (<$) :: a -> Grid b -> Grid a #
ToRenderable a => ToRenderable (Grid a) # |
Instance details Defined in Graphics.Rendering.Chart.Grid Methods toRenderable :: Grid a -> Renderable () #
Show a => Show (Grid a) # |
Instance details Defined in Graphics.Rendering.Chart.Grid Methods showsPrec :: Int -> Grid a -> ShowS # show :: Grid a -> String # showList :: [Grid a] -> ShowS #

type Span = (Int, Int) #

type SpaceWeight = (Double, Double) #

When more space is available for an item than the total width of items, extra added space is proportional to 'space weight'.

tval :: a -> Grid a #

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

tspan :: a -> Span -> Grid a #

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

empty :: Grid a #

A 1x1 empty grid.

nullt :: Grid a #

A 0x0 empty grid.

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

A synonym for `beside`.

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

A synonym for `above`.

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 #

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

width :: Grid a -> Int #

height :: Grid a -> Int #

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

weights :: SpaceWeight -> Grid a -> Grid a #

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

aboveWide :: Grid a -> a -> Grid a #

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

wideAbove :: a -> Grid a -> Grid a #

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

tallBeside :: a -> Grid a -> Grid a #

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

besideTall :: Grid a -> a -> Grid a #

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 a #

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

fullOverlayOver :: a -> Grid a -> Grid a #

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