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

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

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 -> ChartBackend ())]
- data LegendStyle = LegendStyle {
  - _legend_label_style :: FontStyle
  - _legend_margin :: Double
  - _legend_plot_size :: Double
  - _legend_orientation :: LegendOrientation
  }
- data LegendOrientation
  - = LORows Int
  - | LOCols Int
- legendToRenderable :: Legend x y -> Renderable String
- legend_label_style :: Lens' LegendStyle FontStyle
- legend_margin :: Lens' LegendStyle Double
- legend_plot_size :: Lens' LegendStyle Double
- legend_orientation :: Lens' LegendStyle LegendOrientation

# Documentation

data Legend x y Source

Constructors

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

Instances

ToRenderable (Legend x y) Source |

data LegendStyle Source

Constructors

LegendStyle |

Fields

_legend_label_style :: FontStyle
_legend_margin :: Double
_legend_plot_size :: Double
_legend_orientation :: LegendOrientation

Instances

Default LegendStyle Source |

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 |

legendToRenderable :: Legend x y -> Renderable String Source

legend_label_style :: Lens' LegendStyle FontStyle Source

legend_margin :: Lens' LegendStyle Double Source

legend_plot_size :: Lens' LegendStyle Double Source

legend_orientation :: Lens' LegendStyle LegendOrientation Source