d3js-0.1.0.0: Declarative visualization on a web browser with DSL approach.

Safe HaskellSafe-Inferred

D3JS.Type

Contents

Synopsis

Types

data Chain a b whereSource

This represents a method chain with an initial type of a and a final type of b Chains are composable by functions in Control.Category module. See D3JS.Chart for examples.

Constructors

Val :: Var -> Chain () b 
Val' :: Reifiable b => b -> Chain () b 
Val'' :: Var' b -> Chain () b 
Func :: JSFunc a params b -> Chain a b 
Concat :: Chain c b -> Chain a c -> Chain a b 
Nil :: Chain a a 

Instances

Category Chain

Chain a b behaves just like (a -> b). Val Var is the starting point of chain (= constant), and Nil is the termination of chain.

Sel2 (Chain () b) 
Reifiable (Chain a b) 

data Data1D Source

Constructors

Data1D [Double] 

Instances

data SelData a Source

Constructors

SelData 

data Transition Source

Constructors

Transition 

class Reifiable a whereSource

Instances of Reifiable can generate a JavaScript code fragment.

Methods

reify :: a -> TextSource

class Sel a Source

Used just as a tag for typing method chains. Used in D3JS.Func.

Instances

class Sel2 a Source

Used just as a tag for typing method chains. Used in D3JS.Func.

Instances

For internal use

data JSFunc a c b Source

Function call

Constructors

JSFunc FuncName [JSParam] 

Instances

Reifiable (JSFunc a c b) 

data JSParam Source

Parameter for a function call

Instances

data FuncDef Source

Function definition used for a callback.

Constructors

FuncTxt Text 
forall r . FuncExp (NumFunc r) 

data NumFunc r whereSource

Representation of JavaScript function for a callback.

Constructors

NInt :: Int -> NumFunc Int 
NDouble :: Double -> NumFunc Double 
Add :: NumFunc r -> NumFunc r -> NumFunc r 
Subt :: NumFunc r -> NumFunc r -> NumFunc r 
Mult :: NumFunc r -> NumFunc r -> NumFunc r 
Div :: NumFunc r -> NumFunc r -> NumFunc r 
Index :: Int -> NumFunc [r] -> NumFunc r 
Field :: Text -> NumFunc a -> NumFunc r 
NVar :: Var -> NumFunc r 
DataParam :: NumFunc r 

Instances

data Var' dat Source

This should not be used directly by users. Users should use assign to get a variable instead.

Constructors

Var' Var