Safe Haskell | None |
---|---|
Language | Haskell2010 |
Stylistic or syntactical options for chart elements.
Synopsis
- data RectStyle = RectStyle {
- borderSize :: Double
- borderColor :: Colour
- color :: Colour
- defaultRectStyle :: RectStyle
- blob :: Colour -> RectStyle
- clear :: RectStyle
- border :: Double -> Colour -> RectStyle
- data TextStyle = TextStyle {}
- defaultTextStyle :: TextStyle
- styleBoxText :: TextStyle -> Text -> Point Double -> Rect Double
- data ScaleX
- data GlyphStyle = GlyphStyle {}
- defaultGlyphStyle :: GlyphStyle
- styleBoxGlyph :: GlyphStyle -> Rect Double
- gpalette1 :: Int -> GlyphShape
- data ScaleBorder
- data GlyphShape
- glyphText :: GlyphShape -> Text
- data LineStyle = LineStyle {}
- defaultLineStyle :: LineStyle
- data LineCap
- fromLineCap :: IsString s => LineCap -> s
- toLineCap :: (Eq s, IsString s) => s -> LineCap
- data LineJoin
- fromLineJoin :: IsString s => LineJoin -> s
- toLineJoin :: (Eq s, IsString s) => s -> LineJoin
- fromDashArray :: [Double] -> Text
- data Anchor
- fromAnchor :: IsString s => Anchor -> s
- toAnchor :: (Eq s, IsString s) => s -> Anchor
- data PathStyle = PathStyle {
- borderSize :: Double
- borderColor :: Colour
- color :: Colour
- defaultPathStyle :: PathStyle
RectStyle
Rectangle styling
>>>
defaultRectStyle
RectStyle {borderSize = 1.0e-2, borderColor = Colour 0.02 0.29 0.48 1.00, color = Colour 0.02 0.73 0.80 0.10}
RectStyle | |
|
Instances
Eq RectStyle Source # | |
Show RectStyle Source # | |
Generic RectStyle Source # | |
type Rep RectStyle Source # | |
Defined in Chart.Style type Rep RectStyle = D1 ('MetaData "RectStyle" "Chart.Style" "chart-svg-0.3.0-1YbRR4NHUjc7NyiG3vKerW" 'False) (C1 ('MetaCons "RectStyle" 'PrefixI 'True) (S1 ('MetaSel ('Just "borderSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "borderColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Colour) :*: S1 ('MetaSel ('Just "color") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Colour)))) |
defaultRectStyle :: RectStyle Source #
the style
blob :: Colour -> RectStyle Source #
solid rectangle, no border
>>>
blob black
RectStyle {borderSize = 0.0, borderColor = Colour 0.00 0.00 0.00 0.00, color = Colour 0.00 0.00 0.00 1.00}
transparent rect
>>>
clear
RectStyle {borderSize = 0.0, borderColor = Colour 0.00 0.00 0.00 0.00, color = Colour 0.00 0.00 0.00 0.00}
border :: Double -> Colour -> RectStyle Source #
transparent rectangle, with border
>>>
border 0.01 transparent
RectStyle {borderSize = 1.0e-2, borderColor = Colour 0.00 0.00 0.00 0.00, color = Colour 0.00 0.00 0.00 0.00}
TextStyle
Text styling
>>>
defaultTextStyle
TextStyle {size = 0.12, color = Colour 0.05 0.05 0.05 1.00, anchor = AnchorMiddle, hsize = 0.45, vsize = 1.1, vshift = -0.25, rotation = Nothing, scalex = ScaleX, frame = Nothing}
Instances
defaultTextStyle :: TextStyle Source #
the offical text style
styleBoxText :: TextStyle -> Text -> Point Double -> Rect Double Source #
the extra area from text styling
Whether to scale text given X-axis scaling
GlyphStyle
data GlyphStyle Source #
Glyph styling
>>>
defaultGlyphStyle
GlyphStyle {size = 3.0e-2, color = Colour 0.02 0.73 0.80 0.20, borderColor = Colour 0.02 0.29 0.48 1.00, borderSize = 3.0e-3, shape = SquareGlyph, rotation = Nothing, translate = Nothing}
Instances
defaultGlyphStyle :: GlyphStyle Source #
the offical glyph style
styleBoxGlyph :: GlyphStyle -> Rect Double Source #
the extra area from glyph styling
gpalette1 :: Int -> GlyphShape Source #
Infinite list of glyph shapes
>>>
gpalette1 0
CircleGlyph
data ScaleBorder Source #
Should glyph borders be scaled?
Instances
Eq ScaleBorder Source # | |
Defined in Chart.Style (==) :: ScaleBorder -> ScaleBorder -> Bool # (/=) :: ScaleBorder -> ScaleBorder -> Bool # | |
Show ScaleBorder Source # | |
Defined in Chart.Style showsPrec :: Int -> ScaleBorder -> ShowS # show :: ScaleBorder -> String # showList :: [ScaleBorder] -> ShowS # | |
Generic ScaleBorder Source # | |
Defined in Chart.Style type Rep ScaleBorder :: Type -> Type # from :: ScaleBorder -> Rep ScaleBorder x # to :: Rep ScaleBorder x -> ScaleBorder # | |
type Rep ScaleBorder Source # | |
data GlyphShape Source #
glyph shapes
CircleGlyph | |
SquareGlyph | |
EllipseGlyph Double | |
RectSharpGlyph Double | |
RectRoundedGlyph Double Double Double | |
TriangleGlyph (Point Double) (Point Double) (Point Double) | line width is determined by borderSize |
VLineGlyph | |
HLineGlyph | |
PathGlyph Text ScaleBorder |
Instances
glyphText :: GlyphShape -> Text Source #
textifier
LineStyle
line style
>>>
defaultLineStyle
LineStyle {size = 1.2e-2, color = Colour 0.05 0.05 0.05 1.00, linecap = Nothing, linejoin = Nothing, dasharray = Nothing, dashoffset = Nothing}
See also https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
Instances
Eq LineStyle Source # | |
Show LineStyle Source # | |
Generic LineStyle Source # | |
type Rep LineStyle Source # | |
Defined in Chart.Style type Rep LineStyle = D1 ('MetaData "LineStyle" "Chart.Style" "chart-svg-0.3.0-1YbRR4NHUjc7NyiG3vKerW" 'False) (C1 ('MetaCons "LineStyle" 'PrefixI 'True) ((S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "color") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Colour) :*: S1 ('MetaSel ('Just "linecap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LineCap)))) :*: (S1 ('MetaSel ('Just "linejoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LineJoin)) :*: (S1 ('MetaSel ('Just "dasharray") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Double])) :*: S1 ('MetaSel ('Just "dashoffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Double)))))) |
defaultLineStyle :: LineStyle Source #
the official default line style
line cap style
Instances
Eq LineCap Source # | |
Show LineCap Source # | |
Generic LineCap Source # | |
type Rep LineCap Source # | |
Defined in Chart.Style type Rep LineCap = D1 ('MetaData "LineCap" "Chart.Style" "chart-svg-0.3.0-1YbRR4NHUjc7NyiG3vKerW" 'False) (C1 ('MetaCons "LineCapButt" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LineCapRound" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineCapSquare" 'PrefixI 'False) (U1 :: Type -> Type))) |
fromLineCap :: IsString s => LineCap -> s Source #
textifier
line cap style
Instances
Eq LineJoin Source # | |
Show LineJoin Source # | |
Generic LineJoin Source # | |
type Rep LineJoin Source # | |
Defined in Chart.Style type Rep LineJoin = D1 ('MetaData "LineJoin" "Chart.Style" "chart-svg-0.3.0-1YbRR4NHUjc7NyiG3vKerW" 'False) (C1 ('MetaCons "LineJoinMiter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LineJoinBevel" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LineJoinRound" 'PrefixI 'False) (U1 :: Type -> Type))) |
fromLineJoin :: IsString s => LineJoin -> s Source #
textifier
fromDashArray :: [Double] -> Text Source #
Convert a dash representation from a list to text
position anchor
Instances
Eq Anchor Source # | |
Show Anchor Source # | |
Generic Anchor Source # | |
type Rep Anchor Source # | |
Defined in Chart.Style type Rep Anchor = D1 ('MetaData "Anchor" "Chart.Style" "chart-svg-0.3.0-1YbRR4NHUjc7NyiG3vKerW" 'False) (C1 ('MetaCons "AnchorMiddle" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AnchorStart" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AnchorEnd" 'PrefixI 'False) (U1 :: Type -> Type))) |
fromAnchor :: IsString s => Anchor -> s Source #
text
PathStyle
Path styling
>>>
defaultPathStyle
PathStyle {borderSize = 1.0e-2, borderColor = Colour 0.02 0.29 0.48 1.00, color = Colour 0.66 0.07 0.55 1.00}
PathStyle | |
|
Instances
Eq PathStyle Source # | |
Show PathStyle Source # | |
Generic PathStyle Source # | |
type Rep PathStyle Source # | |
Defined in Chart.Style type Rep PathStyle = D1 ('MetaData "PathStyle" "Chart.Style" "chart-svg-0.3.0-1YbRR4NHUjc7NyiG3vKerW" 'False) (C1 ('MetaCons "PathStyle" 'PrefixI 'True) (S1 ('MetaSel ('Just "borderSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double) :*: (S1 ('MetaSel ('Just "borderColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Colour) :*: S1 ('MetaSel ('Just "color") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Colour)))) |
defaultPathStyle :: PathStyle Source #
the style