taffybar-3.0.0: A desktop bar similar to xmobar, but with more GUI

Safe Haskell | None
Language | Haskell2010

System.Taffybar.Widget.Generic.PollingGraph

Contents

- Types
- Constructors and accessors

Description

A variant of the Graph widget that automatically updates itself with a callback at a fixed interval.

Synopsis

- data GraphHandle
- data GraphConfig = GraphConfig {
  - graphPadding :: Int
  - graphBackgroundColor :: RGBA
  - graphBorderColor :: RGBA
  - graphBorderWidth :: Int
  - graphDataColors :: [RGBA]
  - graphDataStyles :: [GraphStyle]
  - graphHistorySize :: Int
  - graphLabel :: Maybe Text
  - graphWidth :: Int
  - graphDirection :: GraphDirection
  }
- data GraphDirection
  - = LEFT_TO_RIGHT
  - | RIGHT_TO_LEFT
- data GraphStyle
  - = Area
  - | Line
- pollingGraphNew :: MonadIO m => GraphConfig -> Double -> IO [Double] -> m Widget
- defaultGraphConfig :: GraphConfig

# Types

data GraphHandle Source #

data GraphConfig Source #

The configuration options for the graph. The padding is the number of pixels reserved as blank space around the widget in each direction.

Constructors

GraphConfig |

Fields

- graphPadding :: Int

  Number of pixels of padding on each side of the graph widget

- graphBackgroundColor :: RGBA

  The background color of the graph (default black)

- graphBorderColor :: RGBA

  The border color drawn around the graph (default gray)

- graphBorderWidth :: Int

  The width of the border (default 1, use 0 to disable the border)

- graphDataColors :: [RGBA]

  Colors for each data set (default cycles between red, green and blue)

- graphDataStyles :: [GraphStyle]

  How to draw each data point (default `repeat Area`)

- graphHistorySize :: Int

  The number of data points to retain for each data set (default 20)

- graphLabel :: Maybe Text

  May contain Pango markup (default `Nothing`)

- graphWidth :: Int

  The width (in pixels) of the graph widget (default 50)

- graphDirection :: GraphDirection

  The direction in which the graph will move as time passes (default LEFT_TO_RIGHT)

data GraphDirection Source #

Constructors

LEFT_TO_RIGHT |
RIGHT_TO_LEFT |

Instances

Eq GraphDirection Source # |
Instance details Defined in System.Taffybar.Widget.Generic.Graph Methods (==) :: GraphDirection -> GraphDirection -> Bool Source # (/=) :: GraphDirection -> GraphDirection -> Bool Source #

data GraphStyle Source #

The style of the graph. Generally, you will want to draw all `Area` graphs first, and then all `Line` graphs.

Constructors

Area | Thea area below the value is filled
Line | The values are connected by a line (one pixel wide)

# Constructors and accessors

pollingGraphNew :: MonadIO m => GraphConfig -> Double -> IO [Double] -> m Widget Source #

defaultGraphConfig :: GraphConfig Source #