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

Safe Haskell | None

Graphics.Rendering.Chart.Plot.Pie

Description

A basic pie chart.

Pie charts are handled different to other plots, in that they have their own layout, and can't be composed with other plots. A pie chart is rendered with code in the following form:

     values :: [PieItem]
     values = [...]
     layout :: PieLayout
     layout = pie_plot ^: pie_data ^= values
            $ defaultPieLayout
     renderable = toRenderable layout

# Documentation

data PieLayout Source

Constructors

PieLayout |

Fields

pie_title_ :: String
pie_title_style_ :: CairoFontStyle
pie_plot_ :: PieChart
pie_background_ :: CairoFillStyle
pie_margin_ :: Double

Instances

ToRenderable PieLayout |

data PieChart Source

Constructors

PieChart |

Fields

pie_data_ :: [PieItem]
pie_colors_ :: [AlphaColour Double]
pie_label_style_ :: CairoFontStyle
pie_label_line_style_ :: CairoLineStyle
pie_start_angle_ :: Double

Instances

ToRenderable PieChart |

data PieItem Source

Constructors

PieItem |

Fields

pitem_label_ :: String
pitem_offset_ :: Double
pitem_value_ :: Double

defaultPieLayout :: PieLayout Source

defaultPieChart :: PieChart Source

defaultPieItem :: PieItem Source

pie_title :: T PieLayout String Source

pie_title_style :: T PieLayout CairoFontStyle Source

pie_plot :: T PieLayout PieChart Source

pie_background :: T PieLayout CairoFillStyle Source

pie_margin :: T PieLayout Double Source

pie_data :: T PieChart [PieItem]Source

pie_colors :: T PieChart [AlphaColour Double]Source

pie_label_style :: T PieChart CairoFontStyle Source

pie_label_line_style :: T PieChart CairoLineStyle Source

pie_start_angle :: T PieChart Double Source

pitem_label :: T PieItem String Source

pitem_offset :: T PieItem Double Source

pitem_value :: T PieItem Double Source