Module

Hylograph.Interpreter.D3

Package
purescript-hylograph-selection
Repository
afcondon/purescript-hylograph-selection

#D3v2Selection_ Source

newtype D3v2Selection_ (state :: Type) (parent :: Type) (datum :: Type)

Selection type for D3v2 interpreter

This is just a newtype wrapper around Hylograph.Internal.Selection.Types.Selection to distinguish it from other interpreter's selection types.

Instances

  • SelectionM D3v2Selection_ D3v2M

    SelectionM instance for D3v2 interpreter

    Delegates all operations to Hylograph.Internal.Selection.Operations, which uses the phantom types with unsafePartial for safe pattern matching.

  • TransitionM D3v2Selection_ D3v2M

    TransitionM instance for D3v2 interpreter

    Implements animated transitions using D3's transition engine. Applies transitions to each element in the bound selection.

#D3v2M Source

newtype D3v2M a

The D3v2 interpreter monad (without simulation state)

Wraps Effect to allow for DOM manipulation.

Instances

#runD3v2M Source

runD3v2M :: D3v2M ~> Effect

Run the D3v2 interpreter

#reselectD3v2 Source

reselectD3v2 :: forall datum datumOut. String -> Map String (D3v2Selection_ SBoundOwns Element datum) -> Effect (D3v2Selection_ SEmpty Element datumOut)

Helper function for reselecting from D3v2 renderTree results

This wraps the reselect function from Operations to work with D3v2Selection_ newtype.

#queryAllD3v2 Source

queryAllD3v2 :: forall datum datumOut. String -> Map String (D3v2Selection_ SBoundOwns Element datum) -> Effect (D3v2Selection_ SEmpty Element datumOut)

Query using CSS selector across all named selections

Like queryAll but works with D3v2Selection_ wrapper. Properly unwraps the newtype before querying.

#getElementsD3v2 Source

getElementsD3v2 :: forall state parent datum. D3v2Selection_ state parent datum -> Array Element

Extract DOM elements from a D3v2Selection_

Useful for attaching behaviors that need raw DOM elements, such as drag handlers for force simulations.

#selectChildInheritingD3v2 Source

selectChildInheritingD3v2 :: forall parent datum. String -> D3v2Selection_ SBoundOwns parent datum -> D3v2M (D3v2Selection_ SBoundOwns Element datum)

Select child elements, inheriting parent's data (D3v2 version)

Wrapper around Operations.selectChildInheriting that works with D3v2Selection_.

Modules
Data.DependencyGraph
Hylograph.AST
Hylograph.Axis.Axis
Hylograph.Brush
Hylograph.Brush.FFI
Hylograph.Brush.Types
Hylograph.Classify
Hylograph.Data.Graph
Hylograph.Data.Graph.Algorithms
Hylograph.Data.Node
Hylograph.Data.Tree
Hylograph.Expr.Animation
Hylograph.Expr.Attr
Hylograph.Expr.Datum
Hylograph.Expr.Expr
Hylograph.Expr.Friendly
Hylograph.Expr.Integration
Hylograph.Expr.Interpreter.CodeGen
Hylograph.Expr.Interpreter.Eval
Hylograph.Expr.Interpreter.Meta
Hylograph.Expr.Interpreter.PureSVG
Hylograph.Expr.Interpreter.SVG
Hylograph.Expr.Path
Hylograph.Expr.Path.Generators
Hylograph.Expr.Sugar
Hylograph.Expr.Units
Hylograph.HATS
Hylograph.HATS.Friendly
Hylograph.HATS.InterpreterTick
Hylograph.HATS.Transitions
Hylograph.Interaction.Brush
Hylograph.Interaction.Coordinated
Hylograph.Interaction.Pointer
Hylograph.Interaction.Zoom
Hylograph.Internal.Attribute
Hylograph.Internal.Behavior.FFI
Hylograph.Internal.Behavior.Types
Hylograph.Internal.Capabilities.Selection
Hylograph.Internal.Capabilities.Transition
Hylograph.Internal.FFI
Hylograph.Internal.Selection.Join
Hylograph.Internal.Selection.Operations
Hylograph.Internal.Selection.Operations.Conversions
Hylograph.Internal.Selection.Operations.Helpers
Hylograph.Internal.Selection.Operations.Selection
Hylograph.Internal.Selection.Query
Hylograph.Internal.Selection.Types
Hylograph.Internal.Transition.FFI
Hylograph.Internal.Transition.Manager
Hylograph.Internal.Transition.Scene
Hylograph.Internal.Transition.Types
Hylograph.Internal.Types
Hylograph.Interpreter.D3
Hylograph.Interpreter.English
Hylograph.Interpreter.Mermaid
Hylograph.Interpreter.MetaAST
Hylograph.Interpreter.SemiQuine
Hylograph.Interpreter.SemiQuine.TreeToCode
Hylograph.Interpreter.SemiQuine.Types
Hylograph.Render
Hylograph.Scale
Hylograph.Scale.FP
Hylograph.Shape.Arc
Hylograph.Shape.Pie
Hylograph.Shape.Polygon
Hylograph.Tooltip
Hylograph.Transform
Hylograph.TreeDSL
Hylograph.TreeDSL.ShapeTree
Hylograph.Unified
Hylograph.Unified.Attribute
Hylograph.Unified.DataDSL
Hylograph.Unified.Display
Hylograph.Unified.Examples
Hylograph.Unified.Join
Hylograph.Unified.Sugar