chart-svg-0.8.3.2: Charting library targetting SVGs.
Safe HaskellNone
LanguageGHC2021

Chart.Style

Description

Definition of the syntactical manifestation of chart elements.

Synopsis

Documentation

data Style Source #

Stylistic content of chart elements, involving how chart data is represented in the physical chart.

>>> defaultStyle
Style {size = 6.0e-2, borderSize = 1.0e-2, color = Colour 0.02 0.73 0.80 0.10, borderColor = Colour 0.02 0.29 0.48 1.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

Constructors

Style 

Fields

Instances

Instances details
Data Style Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Style -> c Style #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Style #

toConstr :: Style -> Constr #

dataTypeOf :: Style -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Style) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Style) #

gmapT :: (forall b. Data b => b -> b) -> Style -> Style #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r #

gmapQ :: (forall d. Data d => d -> u) -> Style -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Style -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Style -> m Style #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style #

Generic Style Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep Style 
Instance details

Defined in Chart.Style

type Rep Style = D1 ('MetaData "Style" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (C1 ('MetaCons "Style" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "borderSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "color") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Colour) :*: S1 ('MetaSel ('Just "borderColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Colour))) :*: ((S1 ('MetaSel ('Just "scaleP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScaleP) :*: S1 ('MetaSel ('Just "textAnchor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TextAnchor)) :*: (S1 ('MetaSel ('Just "rotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: (S1 ('MetaSel ('Just "translate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Point Double))) :*: S1 ('MetaSel ('Just "escapeText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EscapeText))))) :*: (((S1 ('MetaSel ('Just "frame") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Style)) :*: S1 ('MetaSel ('Just "lineCap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LineCap))) :*: (S1 ('MetaSel ('Just "lineJoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LineJoin)) :*: S1 ('MetaSel ('Just "dasharray") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Double])))) :*: ((S1 ('MetaSel ('Just "dashoffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "hsize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "vsize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Just "vshift") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "glyphShape") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlyphShape)))))))

Methods

from :: Style -> Rep Style x #

to :: Rep Style x -> Style #

Show Style Source # 
Instance details

Defined in Chart.Style

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Eq Style Source # 
Instance details

Defined in Chart.Style

Methods

(==) :: Style -> Style -> Bool #

(/=) :: Style -> Style -> Bool #

type Rep Style Source # 
Instance details

Defined in Chart.Style

type Rep Style = D1 ('MetaData "Style" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (C1 ('MetaCons "Style" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "borderSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "color") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Colour) :*: S1 ('MetaSel ('Just "borderColor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Colour))) :*: ((S1 ('MetaSel ('Just "scaleP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScaleP) :*: S1 ('MetaSel ('Just "textAnchor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TextAnchor)) :*: (S1 ('MetaSel ('Just "rotation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: (S1 ('MetaSel ('Just "translate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Point Double))) :*: S1 ('MetaSel ('Just "escapeText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EscapeText))))) :*: (((S1 ('MetaSel ('Just "frame") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Style)) :*: S1 ('MetaSel ('Just "lineCap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LineCap))) :*: (S1 ('MetaSel ('Just "lineJoin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LineJoin)) :*: S1 ('MetaSel ('Just "dasharray") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Double])))) :*: ((S1 ('MetaSel ('Just "dashoffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Double)) :*: S1 ('MetaSel ('Just "hsize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :*: (S1 ('MetaSel ('Just "vsize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Just "vshift") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Just "glyphShape") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GlyphShape)))))))

defaultStyle :: Style Source #

The official default style

>>> defaultStyle
Style {size = 6.0e-2, borderSize = 1.0e-2, color = Colour 0.02 0.73 0.80 0.10, borderColor = Colour 0.02 0.29 0.48 1.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

scaleStyle :: Double -> Style -> Style Source #

Scale the size, borderSize and any translations of a Style.

RectStyle

defaultRectStyle :: Style Source #

The official style for rectangles.

>>> defaultRectStyle
Style {size = 6.0e-2, borderSize = 1.0e-2, color = Colour 0.02 0.73 0.80 0.10, borderColor = Colour 0.02 0.29 0.48 1.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

blob :: Colour -> Style Source #

solid rectangle, no border

>>> blob black
Style {size = 6.0e-2, borderSize = 0.0, color = Colour 0.00 0.00 0.00 1.00, borderColor = Colour 0.00 0.00 0.00 0.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

clear :: Style Source #

transparent rect

>>> clear
Style {size = 6.0e-2, borderSize = 0.0, color = Colour 0.00 0.00 0.00 0.00, borderColor = Colour 0.00 0.00 0.00 0.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

border :: Double -> Colour -> Style Source #

transparent rectangle, with border

>>> border 0.01 transparent
Style {size = 6.0e-2, borderSize = 1.0e-2, color = Colour 0.00 0.00 0.00 0.00, borderColor = Colour 0.00 0.00 0.00 0.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

TextStyle

defaultTextStyle :: Style Source #

The official style for text elements.

>>> defaultTextStyle
Style {size = 6.0e-2, borderSize = 1.0e-2, color = Colour 0.05 0.05 0.05 1.00, borderColor = Colour 0.02 0.29 0.48 1.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

styleBoxText :: Style -> Text -> Point Double -> Rect Double Source #

the extra area from text styling

data EscapeText Source #

Whether to escape the common XML escaped characters.

Constructors

EscapeText 
NoEscapeText 

Instances

Instances details
Data EscapeText Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EscapeText -> c EscapeText #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EscapeText #

toConstr :: EscapeText -> Constr #

dataTypeOf :: EscapeText -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EscapeText) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EscapeText) #

gmapT :: (forall b. Data b => b -> b) -> EscapeText -> EscapeText #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EscapeText -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EscapeText -> r #

gmapQ :: (forall d. Data d => d -> u) -> EscapeText -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EscapeText -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EscapeText -> m EscapeText #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EscapeText -> m EscapeText #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EscapeText -> m EscapeText #

Generic EscapeText Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep EscapeText 
Instance details

Defined in Chart.Style

type Rep EscapeText = D1 ('MetaData "EscapeText" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (C1 ('MetaCons "EscapeText" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoEscapeText" 'PrefixI 'False) (U1 :: Type -> Type))
Show EscapeText Source # 
Instance details

Defined in Chart.Style

Eq EscapeText Source # 
Instance details

Defined in Chart.Style

type Rep EscapeText Source # 
Instance details

Defined in Chart.Style

type Rep EscapeText = D1 ('MetaData "EscapeText" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (C1 ('MetaCons "EscapeText" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoEscapeText" 'PrefixI 'False) (U1 :: Type -> Type))

GlyphStyle

defaultGlyphStyle :: Style Source #

The official style for glyphs.

>>> defaultGlyphStyle
Style {size = 3.0e-2, borderSize = 3.0e-3, color = Colour 0.02 0.73 0.80 0.20, borderColor = Colour 0.02 0.29 0.48 1.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

styleBoxGlyph :: Style -> Rect Double Source #

the extra area from glyph styling

gpalette :: Int -> GlyphShape Source #

Infinite list of glyph shapes

>>> gpalette 0
CircleGlyph

data GlyphShape Source #

glyph shapes

Instances

Instances details
Data GlyphShape Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GlyphShape -> c GlyphShape #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GlyphShape #

toConstr :: GlyphShape -> Constr #

dataTypeOf :: GlyphShape -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GlyphShape) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GlyphShape) #

gmapT :: (forall b. Data b => b -> b) -> GlyphShape -> GlyphShape #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GlyphShape -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GlyphShape -> r #

gmapQ :: (forall d. Data d => d -> u) -> GlyphShape -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GlyphShape -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GlyphShape -> m GlyphShape #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GlyphShape -> m GlyphShape #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GlyphShape -> m GlyphShape #

Generic GlyphShape Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep GlyphShape 
Instance details

Defined in Chart.Style

type Rep GlyphShape = D1 ('MetaData "GlyphShape" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (((C1 ('MetaCons "CircleGlyph" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SquareGlyph" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EllipseGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :+: C1 ('MetaCons "RectSharpGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))) :+: ((C1 ('MetaCons "RectRoundedGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) :+: C1 ('MetaCons "TriangleGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point Double)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point Double)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point Double))))) :+: (C1 ('MetaCons "VLineGlyph" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HLineGlyph" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PathGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))))
Show GlyphShape Source # 
Instance details

Defined in Chart.Style

Eq GlyphShape Source # 
Instance details

Defined in Chart.Style

type Rep GlyphShape Source # 
Instance details

Defined in Chart.Style

type Rep GlyphShape = D1 ('MetaData "GlyphShape" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) (((C1 ('MetaCons "CircleGlyph" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SquareGlyph" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EllipseGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :+: C1 ('MetaCons "RectSharpGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)))) :+: ((C1 ('MetaCons "RectRoundedGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) :+: C1 ('MetaCons "TriangleGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point Double)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point Double)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Point Double))))) :+: (C1 ('MetaCons "VLineGlyph" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HLineGlyph" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PathGlyph" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))))))

LineStyle

defaultLineStyle :: Style Source #

The official style for lines.

>>> defaultLineStyle
Style {size = 1.2e-2, borderSize = 1.0e-2, color = Colour 0.05 0.05 0.05 1.00, borderColor = Colour 0.02 0.29 0.48 1.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

data LineCap Source #

line cap style

Instances

Instances details
Data LineCap Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LineCap -> c LineCap #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LineCap #

toConstr :: LineCap -> Constr #

dataTypeOf :: LineCap -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LineCap) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LineCap) #

gmapT :: (forall b. Data b => b -> b) -> LineCap -> LineCap #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LineCap -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LineCap -> r #

gmapQ :: (forall d. Data d => d -> u) -> LineCap -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LineCap -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LineCap -> m LineCap #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LineCap -> m LineCap #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LineCap -> m LineCap #

Generic LineCap Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep LineCap 
Instance details

Defined in Chart.Style

type Rep LineCap = D1 ('MetaData "LineCap" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" '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)))

Methods

from :: LineCap -> Rep LineCap x #

to :: Rep LineCap x -> LineCap #

Show LineCap Source # 
Instance details

Defined in Chart.Style

Eq LineCap Source # 
Instance details

Defined in Chart.Style

Methods

(==) :: LineCap -> LineCap -> Bool #

(/=) :: LineCap -> LineCap -> Bool #

type Rep LineCap Source # 
Instance details

Defined in Chart.Style

type Rep LineCap = D1 ('MetaData "LineCap" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" '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 #

svg textifier

toLineCap :: (Eq s, IsString s) => s -> LineCap Source #

readifier

data LineJoin Source #

line cap style

Instances

Instances details
Data LineJoin Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LineJoin -> c LineJoin #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LineJoin #

toConstr :: LineJoin -> Constr #

dataTypeOf :: LineJoin -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LineJoin) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LineJoin) #

gmapT :: (forall b. Data b => b -> b) -> LineJoin -> LineJoin #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LineJoin -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LineJoin -> r #

gmapQ :: (forall d. Data d => d -> u) -> LineJoin -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LineJoin -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LineJoin -> m LineJoin #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LineJoin -> m LineJoin #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LineJoin -> m LineJoin #

Generic LineJoin Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep LineJoin 
Instance details

Defined in Chart.Style

type Rep LineJoin = D1 ('MetaData "LineJoin" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" '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)))

Methods

from :: LineJoin -> Rep LineJoin x #

to :: Rep LineJoin x -> LineJoin #

Show LineJoin Source # 
Instance details

Defined in Chart.Style

Eq LineJoin Source # 
Instance details

Defined in Chart.Style

type Rep LineJoin Source # 
Instance details

Defined in Chart.Style

type Rep LineJoin = D1 ('MetaData "LineJoin" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" '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 #

svg textifier

toLineJoin :: (Eq s, IsString s) => s -> LineJoin Source #

readifier

Stack Styling

data TextAnchor Source #

Text Anchor

Instances

Instances details
Data TextAnchor Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TextAnchor -> c TextAnchor #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TextAnchor #

toConstr :: TextAnchor -> Constr #

dataTypeOf :: TextAnchor -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TextAnchor) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TextAnchor) #

gmapT :: (forall b. Data b => b -> b) -> TextAnchor -> TextAnchor #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TextAnchor -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TextAnchor -> r #

gmapQ :: (forall d. Data d => d -> u) -> TextAnchor -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TextAnchor -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TextAnchor -> m TextAnchor #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TextAnchor -> m TextAnchor #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TextAnchor -> m TextAnchor #

Generic TextAnchor Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep TextAnchor 
Instance details

Defined in Chart.Style

type Rep TextAnchor = D1 ('MetaData "TextAnchor" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" '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)))
Show TextAnchor Source # 
Instance details

Defined in Chart.Style

Eq TextAnchor Source # 
Instance details

Defined in Chart.Style

type Rep TextAnchor Source # 
Instance details

Defined in Chart.Style

type Rep TextAnchor = D1 ('MetaData "TextAnchor" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" '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)))

fromAnchoring :: Double -> TextAnchor Source #

Convert a Double to a TextAnchor

data Align Source #

Aligning stacked things.

Instances

Instances details
Data Align Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Align -> c Align #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Align #

toConstr :: Align -> Constr #

dataTypeOf :: Align -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Align) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Align) #

gmapT :: (forall b. Data b => b -> b) -> Align -> Align #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Align -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Align -> r #

gmapQ :: (forall d. Data d => d -> u) -> Align -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Align -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Align -> m Align #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Align -> m Align #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Align -> m Align #

Generic Align Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep Align 
Instance details

Defined in Chart.Style

type Rep Align = D1 ('MetaData "Align" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) ((C1 ('MetaCons "NoAlign" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlignRight" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AlignLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlignMid" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: Align -> Rep Align x #

to :: Rep Align x -> Align #

Show Align Source # 
Instance details

Defined in Chart.Style

Methods

showsPrec :: Int -> Align -> ShowS #

show :: Align -> String #

showList :: [Align] -> ShowS #

Eq Align Source # 
Instance details

Defined in Chart.Style

Methods

(==) :: Align -> Align -> Bool #

(/=) :: Align -> Align -> Bool #

type Rep Align Source # 
Instance details

Defined in Chart.Style

type Rep Align = D1 ('MetaData "Align" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) ((C1 ('MetaCons "NoAlign" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlignRight" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AlignLeft" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlignMid" 'PrefixI 'False) (U1 :: Type -> Type)))

PathStyle

defaultPathStyle :: Style Source #

The official style for paths.

>>> defaultPathStyle
Style {size = 6.0e-2, borderSize = 1.0e-2, color = Colour 0.66 0.07 0.55 1.00, borderColor = Colour 0.02 0.29 0.48 1.00, scaleP = NoScaleP, textAnchor = AnchorMiddle, rotation = Nothing, translate = Nothing, escapeText = EscapeText, frame = Nothing, lineCap = Nothing, lineJoin = Nothing, dasharray = Nothing, dashoffset = Nothing, hsize = 0.6, vsize = 1.1, vshift = -0.25, glyphShape = SquareGlyph}

Style scaling

data ScaleP Source #

Scale Projection options

Constructors

NoScaleP

Do not scale under projection.

ScalePX

Scale based on the X axis ratio of a projection

ScalePY

Scale based on the Y axis ratio of a projection

ScalePMinDim

Scale based on minimum of (X axis, Y axis) ratio

ScalePArea

Scale based on the area ratio of a projection

Instances

Instances details
Data ScaleP Source # 
Instance details

Defined in Chart.Style

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ScaleP -> c ScaleP #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ScaleP #

toConstr :: ScaleP -> Constr #

dataTypeOf :: ScaleP -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ScaleP) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScaleP) #

gmapT :: (forall b. Data b => b -> b) -> ScaleP -> ScaleP #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ScaleP -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ScaleP -> r #

gmapQ :: (forall d. Data d => d -> u) -> ScaleP -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ScaleP -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ScaleP -> m ScaleP #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ScaleP -> m ScaleP #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ScaleP -> m ScaleP #

Generic ScaleP Source # 
Instance details

Defined in Chart.Style

Associated Types

type Rep ScaleP 
Instance details

Defined in Chart.Style

type Rep ScaleP = D1 ('MetaData "ScaleP" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) ((C1 ('MetaCons "NoScaleP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScalePX" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ScalePY" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ScalePMinDim" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScalePArea" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: ScaleP -> Rep ScaleP x #

to :: Rep ScaleP x -> ScaleP #

Show ScaleP Source # 
Instance details

Defined in Chart.Style

Eq ScaleP Source # 
Instance details

Defined in Chart.Style

Methods

(==) :: ScaleP -> ScaleP -> Bool #

(/=) :: ScaleP -> ScaleP -> Bool #

type Rep ScaleP Source # 
Instance details

Defined in Chart.Style

type Rep ScaleP = D1 ('MetaData "ScaleP" "Chart.Style" "chart-svg-0.8.3.2-HqC5koQF24PBkrFlIP6qwR" 'False) ((C1 ('MetaCons "NoScaleP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScalePX" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ScalePY" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ScalePMinDim" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScalePArea" 'PrefixI 'False) (U1 :: Type -> Type))))

scaleRatio :: ScaleP -> Rect Double -> Rect Double -> Double Source #

given a ScaleP and two Rects, what is the scaling factor for a projection

Guards against scaling to zero or infinity