Safe Haskell | None |
---|---|
Language | Haskell2010 |
textual chart elements
- data TextOptions = TextOptions Double AlignH AlignV (AlphaColour Double) FillRule Double TextType
- newtype TextPathOptions = TextPathOptions TextFont
- data TextSvgOptions = TextSvgOptions Double Double Double Double
- data TextType
- data TextFont
- textFont :: TextFont -> PreparedFont Double
- text_ :: TextOptions -> Text -> Chart b
- texts :: R2 r => TextOptions -> [(Text, r Double)] -> Chart b
- textChart :: Traversable f => [TextOptions] -> Rect Double -> Rect Double -> [f (Text, Pair Double)] -> Chart b
- textChart_ :: [TextOptions] -> Rect Double -> [[(Text, Pair Double)]] -> Chart b
- data LabelOptions = LabelOptions TextOptions (Pair Double) Double
- labelled :: LabelOptions -> Text -> Chart b -> Chart b
Documentation
data TextOptions Source #
text options
newtype TextPathOptions Source #
options specific to text as an SVG path
data TextSvgOptions Source #
options specific to text as SVG text
text as a path or as svg text
textFont :: TextFont -> PreparedFont Double Source #
transform from chart-unit to SVGFonts rep of font
text_ :: TextOptions -> Text -> Chart b Source #
Create a textual chart element
text_ def "Welcome to chart-unit!"
texts :: R2 r => TextOptions -> [(Text, r Double)] -> Chart b Source #
Create positioned text from a list
ts :: [(Text, Pair Double)] ts = zip (map Text.singleton ['a' .. 'z']) [Pair (sin (x * 0.1)) x | x <- [0 .. 25]] textsExample :: Chart b textsExample = texts def ts
textChart :: Traversable f => [TextOptions] -> Rect Double -> Rect Double -> [f (Text, Pair Double)] -> Chart b Source #
A chart of text
textChart_ :: [TextOptions] -> Rect Double -> [[(Text, Pair Double)]] -> Chart b Source #
A chart of text scaled to its own range
textChart_Example :: Chart b textChart_Example = textChart_ [#size .~ 0.33 $ def] widescreen [ts]
data LabelOptions Source #
A label is a text element attached to a chart element