Safe Haskell | None |
---|---|
Language | Haskell2010 |
Chart.Text
Description
textual chart elements
- data TextOptions = TextOptions {}
- text_ :: TextOptions -> Text -> Chart b
- texts :: R2 r => TextOptions -> [Text] -> [r Double] -> Chart b
- textChart :: Traversable f => [TextOptions] -> Aspect -> Rect Double -> [f (Text, Pair Double)] -> Chart b
- textChart_ :: [TextOptions] -> Aspect -> [[(Text, Pair Double)]] -> Chart b
- data LabelOptions = LabelOptions {}
- labelled :: LabelOptions -> Text -> Chart b -> Chart b
Documentation
data TextOptions Source #
text options
Constructors
TextOptions | |
Fields
|
Instances
text_ :: TextOptions -> Text -> Chart b Source #
Create a textual chart element
let text_Example = text_ def "Welcome to chart-unit!"
texts :: R2 r => TextOptions -> [Text] -> [r Double] -> Chart b Source #
Creatye positioned text from a list
let ts = map (Text.singleton) ['a'..'z'] texts def ts [Pair (0.05*x) 0 |x <- [0..5]]
textChart :: Traversable f => [TextOptions] -> Aspect -> Rect Double -> [f (Text, Pair Double)] -> Chart b Source #
A chart of text
textChart_ :: [TextOptions] -> Aspect -> [[(Text, Pair Double)]] -> Chart b Source #
A chart of text scaled to its own range
import qualified Data.Text as Text let ps = [Pair (sin (x*0.1)) x | x<-[0..25]] textChart_ (repeat $ def {textSize=0.33}) widescreen [zip ts ps]
data LabelOptions Source #
A label is a text element attached to a chart element
Constructors
LabelOptions | |
Fields
|
Instances