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

Copyright | (c) Tim Docker 2008 2014
License | BSD-style (see chart/COPYRIGHT)
Safe Haskell | None
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 #

Constructors

PieLayout |
Fields _pie_title :: String _pie_title_style :: FontStyle _pie_plot :: PieChart _pie_background :: FillStyle _pie_margin :: Double

#### Instances

Instances details

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

data PieChart #

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 # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Pie Methods toRenderable :: PieChart -> Renderable () #
Default PieChart # |
Instance details Defined in Graphics.Rendering.Chart.Plot.Pie Methods def :: PieChart #

data PieItem #

Constructors

PieItem |
Fields _pitem_label :: String _pitem_offset :: Double _pitem_value :: Double

#### Instances

Instances details

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

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

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

pie_title :: Lens' PieLayout String #

pie_title_style :: Lens' PieLayout FontStyle #

pie_plot :: Lens' PieLayout PieChart #

pie_background :: Lens' PieLayout FillStyle #

pie_margin :: Lens' PieLayout Double #

pie_data :: Lens' PieChart [PieItem] #

pie_colors :: Lens' PieChart [AlphaColour Double] #

pie_label_style :: Lens' PieChart FontStyle #

pie_label_line_style :: Lens' PieChart LineStyle #

pie_start_angle :: Lens' PieChart Double #

pitem_label :: Lens' PieItem String #

pitem_offset :: Lens' PieItem Double #

pitem_value :: Lens' PieItem Double #