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

Safe Haskell | None

Graphics.Rendering.Chart.Legend

Description

Types and functions for handling the legend(s) on a chart. A legend is an area on the chart used to label the plotted values.

Synopsis

- data Legend x y = Legend LegendStyle [(String, Rect -> CRender ())]
- data LegendStyle = LegendStyle {
  - legend_label_style_ :: CairoFontStyle
  - legend_margin_ :: Double
  - legend_plot_size_ :: Double
  - legend_orientation_ :: LegendOrientation
  }
- data LegendOrientation
  - = LORows Int
  - | LOCols Int
- defaultLegendStyle :: LegendStyle
- legendToRenderable :: Legend x y -> Renderable String
- legend_label_style :: T LegendStyle CairoFontStyle
- legend_margin :: T LegendStyle Double
- legend_plot_size :: T LegendStyle Double
- legend_orientation :: T LegendStyle LegendOrientation

# Documentation

data Legend x y Source

Constructors

Legend LegendStyle [(String, Rect -> CRender ())] |

Instances

ToRenderable (Legend x y) |

data LegendStyle Source

Constructors

LegendStyle |

Fields

legend_label_style_ :: CairoFontStyle
legend_margin_ :: Double
legend_plot_size_ :: Double
legend_orientation_ :: LegendOrientation

data LegendOrientation Source

Legends can be constructed in two orientations: in rows (where we specify the maximum number of columns), and in columns (where we specify the maximum number of rows)

Constructors

LORows Int |
LOCols Int |

defaultLegendStyle :: LegendStyle Source

legendToRenderable :: Legend x y -> Renderable String Source

legend_label_style :: T LegendStyle CairoFontStyle Source

legend_margin :: T LegendStyle Double Source

legend_plot_size :: T LegendStyle Double Source

legend_orientation :: T LegendStyle LegendOrientation Source