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

Safe HaskellNone

Graphics.Rendering.Chart.Renderable

Description

 

Synopsis

Documentation

data Renderable Source

A Renderable is a record of functions required to layout a graphic element.

Constructors

Renderable 

Fields

minsize :: CRender RectSize

a Cairo action to calculate a minimum size,

render :: Rect -> CRender ()

a Cairo action for drawing it within a specified rectangle.

class ToRenderable a whereSource

A type class abtracting the conversion of a value to a Renderable.

grid :: [Double] -> [Double] -> [[(Int, Renderable)]] -> RenderableSource

Layout multiple Renderables into a grid. Arg 1 is the weights for the allocation of extra horizontal space to columns, Arg 2 is the weights for the allocation of extra vertical space to rows, and Arg 3 is the grid of renderables to be layed out. Each element of the grid is a tuple - the first item of the tuple is the drawing priority. Lower priorities get drawn first. Drawing order is significant when Renderables draw outside their edges.

renderableToPNGFile :: Renderable -> Int -> Int -> FilePath -> IO ()Source

Output the given renderable to a PNG file of the specifed size (in pixels), to the specified file.

renderableToPDFFile :: Renderable -> Int -> Int -> FilePath -> IO ()Source

Output the given renderable to a PDF file of the specifed size (in points), to the specified file.

renderableToPSFile :: Renderable -> Int -> Int -> FilePath -> IO ()Source

Output the given renderable to a postscript file of the specifed size (in points), to the specified file.

data Legend Source

Constructors

Legend Bool LegendStyle [(String, Plot)] 

Instances