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

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

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
           $ def
    renderable = toRenderable layout

# Documentation

data PieLayout Source #

Constructors

PieLayout |

Fields

- _pie_title :: String
- _pie_title_style :: FontStyle
- _pie_plot :: PieChart
- _pie_background :: FillStyle
- _pie_margin :: Double

#### Instances

Instances details

ToRenderable PieLayout Source # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Pie Methods toRenderable :: PieLayout -> Renderable () Source #
Default PieLayout Source # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Pie Methods def :: PieLayout Source #

data PieChart Source #

Constructors

PieChart |

Fields

- _pie_data :: [PieItem]
- _pie_colors :: [AlphaColour Double]
- _pie_label_style :: FontStyle
- _pie_label_line_style :: LineStyle
- _pie_start_angle :: Double

#### Instances

Instances details

ToRenderable PieChart Source # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Pie Methods toRenderable :: PieChart -> Renderable () Source #
Default PieChart Source # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Pie Methods def :: PieChart Source #

data PieItem Source #

Constructors

PieItem |

Fields

- _pitem_label :: String
- _pitem_offset :: Double
- _pitem_value :: Double

#### Instances

Instances details

Default PieItem Source # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Pie Methods def :: PieItem Source #

pieToRenderable :: PieLayout -> Renderable (PickFn a) Source #

pieChartToRenderable :: PieChart -> Renderable (PickFn a) Source #

pie_title :: Lens' PieLayout String Source #

pie_title_style :: Lens' PieLayout FontStyle Source #

pie_plot :: Lens' PieLayout PieChart Source #

pie_background :: Lens' PieLayout FillStyle Source #

pie_margin :: Lens' PieLayout Double Source #

pie_data :: Lens' PieChart [PieItem] Source #

pie_colors :: Lens' PieChart [AlphaColour Double] Source #

pie_label_style :: Lens' PieChart FontStyle Source #

pie_label_line_style :: Lens' PieChart LineStyle Source #

pie_start_angle :: Lens' PieChart Double Source #

pitem_label :: Lens' PieItem String Source #

pitem_offset :: Lens' PieItem Double Source #

pitem_value :: Lens' PieItem Double Source #