chart-svg-0.2.2: Charting library targetting SVGs.
Safe HaskellNone
LanguageHaskell2010

Chart.Reanimate

Description

Integration of reanimate and chart-svg

Synopsis

Documentation

data ReanimateConfig Source #

global reanimate configuration.

>>> defaultReanimateConfig
ReanimateConfig {duration = 5.0, background = Just "black", globalFontFamily = Just ["Arial","Helvetica","sans-serif"], globalFontStyle = Just FontStyleNormal, globalAlignment = AlignxMinYMin}

Instances

Instances details
Eq ReanimateConfig Source # 
Instance details

Defined in Chart.Reanimate

Show ReanimateConfig Source # 
Instance details

Defined in Chart.Reanimate

Generic ReanimateConfig Source # 
Instance details

Defined in Chart.Reanimate

Associated Types

type Rep ReanimateConfig :: Type -> Type #

type Rep ReanimateConfig Source # 
Instance details

Defined in Chart.Reanimate

type Rep ReanimateConfig = D1 ('MetaData "ReanimateConfig" "Chart.Reanimate" "chart-svg-0.2.2-AJskDBGhW2w5nFQE5Ah360" 'False) (C1 ('MetaCons "ReanimateConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "duration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "background") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "globalFontFamily") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "globalFontStyle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FontStyle)) :*: S1 ('MetaSel ('Just "globalAlignment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Alignment)))))

animChartSvg :: ReanimateConfig -> (Double -> ChartSvg) -> Animation Source #

Animate a ChartSvg animation.

data ChartReanimate Source #

The output of the raw translation of ChartSvg to a reanimate svg tree.

Constructors

ChartReanimate 

Fields

Instances

Instances details
Eq ChartReanimate Source # 
Instance details

Defined in Chart.Reanimate

Show ChartReanimate Source # 
Instance details

Defined in Chart.Reanimate

Generic ChartReanimate Source # 
Instance details

Defined in Chart.Reanimate

Associated Types

type Rep ChartReanimate :: Type -> Type #

type Rep ChartReanimate Source # 
Instance details

Defined in Chart.Reanimate

type Rep ChartReanimate = D1 ('MetaData "ChartReanimate" "Chart.Reanimate" "chart-svg-0.2.2-AJskDBGhW2w5nFQE5Ah360" 'False) (C1 ('MetaCons "ChartReanimate" 'PrefixI 'True) (S1 ('MetaSel ('Just "trees") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Tree]) :*: (S1 ('MetaSel ('Just "box") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Rect Double)) :*: S1 ('MetaSel ('Just "size") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Point Double)))))

chartReanimate :: ChartSvg -> ChartReanimate Source #

Render a ChartSvg to Trees, the fitted chart viewbox, and the suggested SVG dimensions

toTreeA :: ReanimateConfig -> (Double -> ChartSvg) -> Double -> Tree Source #

convert a ChartSvg animation to a Tree animation.

tree :: Chart Double -> Tree Source #

convert a Chart to a Tree

treeFromFile :: FilePath -> IO Tree Source #

import a Tree from a file