Module

Hylograph.Expr.Interpreter.PureSVG

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

Pure SVG Interpreter

Generates complete SVG documents without any D3 dependency. Use cases:

  • Server-side rendering (zero JS on client)
  • Browser-side static charts (no D3 bundle needed)
  • Exporting visualizations to files
  • Email/PDF embedding

For simple visualizations, this can replace D3 entirely, dramatically reducing bundle size.

#SVGElement Source

data SVGElement

An SVG element with tag, attributes, and children

Constructors

#SVGDoc Source

type SVGDoc = { children :: Array SVGElement, height :: Number, viewBox :: Maybe String, width :: Number }

A complete SVG document

#svg Source

svg :: Number -> Number -> Array SVGElement -> SVGDoc

Create an SVG root element

#g Source

g :: Array { name :: String, value :: String } -> Array SVGElement -> SVGElement

Group element

#circle Source

circle :: { cx :: String, cy :: String, r :: String } -> Array { name :: String, value :: String } -> SVGElement

Circle element

#rect Source

rect :: { height :: String, width :: String, x :: String, y :: String } -> Array { name :: String, value :: String } -> SVGElement

Rectangle element

#line Source

line :: { x1 :: String, x2 :: String, y1 :: String, y2 :: String } -> Array { name :: String, value :: String } -> SVGElement

Line element

#text Source

text :: { x :: String, y :: String } -> Array { name :: String, value :: String } -> String -> SVGElement

Text element

#path Source

path :: String -> Array { name :: String, value :: String } -> SVGElement

Path element

#render Source

render :: SVGElement -> String

Render an element to SVG string

#renderDoc Source

renderDoc :: SVGDoc -> String

Render a complete SVG document

#forData Source

forData :: forall a. Array a -> (a -> Int -> SVGElement) -> Array SVGElement

Map over data with index, like D3's data join but pure

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