Module

Hylograph.Internal.Selection.Operations.Conversions

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

Type Conversions for Selection Operations

Pure functions for converting between types used in selection operations. No Effect, no cross-dependencies with other Operations modules.

#transitionEasingToAnimEasing Source

transitionEasingToAnimEasing :: Easing -> EasingType

Convert TransitionTypes.Easing to Attribute.EasingType

These are parallel type hierarchies to avoid circular dependencies.

#attributeValueToNumber Source

attributeValueToNumber :: AttributeValue -> Number

Convert AttributeValue to Number for animation

For string values, attempts to parse as number. Returns 0.0 on failure.

#attributeValueToString Source

attributeValueToString :: AttributeValue -> String

Convert AttributeValue to String for DOM attributes

#isNumericAttributeValue Source

isNumericAttributeValue :: AttributeValue -> Boolean

Check if an AttributeValue is numeric (can be animated)

NumberValue is always numeric. StringValue is numeric only if it parses as a valid number. BooleanValue could be animated as 0/1 but for simplicity we treat as non-numeric.

#elementTypeToString Source

elementTypeToString :: ElementType -> String

Convert ElementType to its string representation for DOM creation

#stringToElementType Source

stringToElementType :: String -> ElementType

Convert string to ElementType (inverse of elementTypeToString)

#highlightClassToInt Source

highlightClassToInt :: HighlightClass -> Int

Convert HighlightClass to Int for FFI Must match the constants in FFI.js: HC_PRIMARY=0, HC_RELATED=1, HC_DIMMED=2, HC_NEUTRAL=3, HC_UPSTREAM=4, HC_DOWNSTREAM=5

#tooltipTriggerToInt Source

tooltipTriggerToInt :: TooltipTrigger -> Int

Convert TooltipTrigger to Int for FFI Must match the constants in FFI.js: TT_ON_HOVER=0, TT_WHEN_PRIMARY=1, TT_WHEN_RELATED=2

#parseNumberOrZero Source

parseNumberOrZero :: String -> Number

Parse a string as a number, returning 0.0 if parsing fails

#isNumericString Source

isNumericString :: String -> Boolean

Check if a string can be parsed as a number

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