| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
System.Taffybar.Widget.Generic.Graph
Description
This is a graph widget inspired by the widget of the same name in Awesome
 (the window manager). It plots a series of data points similarly to a bar
 graph. This version must be explicitly fed data with graphAddSample. For a
 more automated version, see System.Taffybar.Widgets.Generic.PollingGraph.
Like Awesome, this graph can plot multiple data sets in one widget. The data sets are plotted in the order provided by the caller.
Note: all of the data fed to this widget should be in the range [0,1].
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
- data GraphStyle
- graphNew :: MonadIO m => GraphConfig -> m (Widget, GraphHandle)
- graphAddSample :: GraphHandle -> [Double] -> IO ()
- 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 
 | |
Instances
| Default GraphConfig Source # | |
| Defined in System.Taffybar.Widget.Generic.Graph Methods def :: GraphConfig # | |
data GraphDirection Source #
Constructors
| LEFT_TO_RIGHT | |
| RIGHT_TO_LEFT | 
Instances
| Eq GraphDirection Source # | |
| Defined in System.Taffybar.Widget.Generic.Graph Methods (==) :: GraphDirection -> GraphDirection -> Bool # (/=) :: GraphDirection -> GraphDirection -> Bool # | |
data GraphStyle Source #
Functions
graphNew :: MonadIO m => GraphConfig -> m (Widget, GraphHandle) Source #
graphAddSample :: GraphHandle -> [Double] -> IO () Source #
Add a data point to the graph for each of the tracked data sets. There should be as many values in the list as there are data sets.