HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulegraphviz-2999.20.2.0Haskell2010

Data.GraphViz.Attributes.HTML

This module is written to be imported qualified. It defines the syntax for HTML-like values for use in Graphviz. Please note that these values are not really HTML, but the term "HTML" is used throughout as it is less cumbersome than "HTML-like". To be able to use this, the version of Graphviz must be at least 1.10. For more information, please see: http://graphviz.org/doc/info/shapes.html#html

The actual definition of the syntax specifies that these types must be valid XML syntax. As such, this assumed when printing and parsing, though the correct escape/descaping for ", &, < and > are automatically done when printing and parsing.

Differences from how Graphviz treats HTML-like values:

  • Graphviz only specifies the above-listed characters must be escaped; however, internally it also escapes -, ' and multiple sequences of spaces. This library attempts to match this behaviour. Please let me know if this behaviour (especially about escaping multiple spaces) is unwanted.

  • When parsing escaped HTML characters, numeric escapes are converted to the corresponding character as are the various characters listed above; all other escaped characters (apart from those listed above) are silently ignored and removed from the input (since technically these must be valid XML, which doesn't recognise as many named escape characters as does HTML).

  • All whitespace read in is kept (even if Graphviz would ignore multiple whitespace characters); when printing them, however, they are replaced with non-breaking spaces. As such, if multiple literal whitespace characters are used in a sequence, then the result of parsing and then printing some Dot code will not be the same as the initial Dot code. Furthermore, all whitespace characters are printed as spaces.

  • It is assumed that all parsed & values are the beginning of an XML escape sequence (which must finish with a ; character).

  • There should be no pre-escaped characters in values; when printing, the & will get escaped without considering if that is an escaped character.

  • 16 types
datadata Label
#

The overall type for HTML-like labels. Fundamentally, HTML-like values in Graphviz are either textual (i.e. a single element with formatting) or a table. Note that Label values can be nested via LabelCell.

Constructors

Instances7Eq, Ord, Read, Show, Labellable, ParseDot, …
  • Eq LabelDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord LabelDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read LabelDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show LabelDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Labellable LabelDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes
  • ParseDot LabelDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot LabelDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
typetype Text = [TextItem]
#

Represents a textual component of an HTML-like label. It is assumed that a Text list is non-empty. It is preferable to "group" Str values together rather than have individual ones. Note that when printing, the individual values are concatenated together without spaces, and when parsing anything that isn't a tag is assumed to be a Str: that is, something like "<BR/> <BR/>" is parsed as:

[Newline [], Str " ", Newline []]
datadata TextItem
#

Textual items in HTML-like labels.

Constructors

Instances7Eq, Ord, Read, Show, Labellable, ParseDot, …
  • Eq TextItemDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord TextItemDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read TextItemDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show TextItemDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Labellable TextDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes
  • ParseDot TextItemDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot TextItemDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Format
#

Constructors

Instances8Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Enum FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Eq FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot FormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Table
#

A table in HTML-like labels. Tables are optionally wrapped in overall FONT tags.

Constructors

Instances7Eq, Ord, Read, Show, Labellable, ParseDot, …
  • Eq TableDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord TableDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read TableDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show TableDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Labellable TableDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes
  • ParseDot TableDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot TableDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Row
#

A row in a Table. The list of Cell values is assumed to be non-empty.

Constructors

Instances6Eq, Ord, Read, Show, ParseDot, PrintDot
  • Eq RowDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord RowDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read RowDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show RowDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot RowDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot RowDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Cell
#

Cells either recursively contain another Label or else a path to an image file.

Constructors

Instances6Eq, Ord, Read, Show, ParseDot, PrintDot
  • Eq CellDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord CellDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read CellDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show CellDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot CellDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot CellDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
newtypenewtype Img
#

The path to an image; accepted Attributes are Scale and Src.

Constructors

Instances6Eq, Ord, Read, Show, ParseDot, PrintDot
  • Eq ImgDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord ImgDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read ImgDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show ImgDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot ImgDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot ImgDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Attribute
#

Note that not all Attribute values are valid everywhere: see the comments for each one on where it is valid.

Constructors

Instances6Eq, Ord, Read, Show, ParseDot, PrintDot
  • Eq AttributeDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord AttributeDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read AttributeDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show AttributeDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot AttributeDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot AttributeDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Align
#

Specifies horizontal placement. When an object is allocated more space than required, this value determines where the extra space is placed left and right of the object.

Constructors

  • HLeft
  • HCenter

    Default value.

  • HRight
  • HText

    LabelCell values only; aligns lines of text using the full cell width. The alignment of a line is determined by its (possibly implicit) associated Newline element.

Instances8Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Enum AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Eq AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot AlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata VAlign
#

Specifies vertical placement. When an object is allocated more space than required, this value determines where the extra space is placed above and below the object.

Constructors

Instances8Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Enum VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Eq VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot VAlignDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata CellFormat
#
Instances8Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Enum CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Eq CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot CellFormatDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Scale
#

Specifies how an image will use any extra space available in its cell. If undefined, the image inherits the value of the ImageScale attribute.

Instances8Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Enum ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Eq ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot ScaleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Side
#

Which sides of a border in a cell or table should be drawn, if a border is drawn.

Instances8Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Enum SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Eq SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot SideDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
datadata Style
#

Constructors

Instances8Bounded, Enum, Eq, Ord, Read, Show, …
  • Bounded StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Enum StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Eq StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Ord StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Read StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • Show StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • ParseDot StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML
  • PrintDot StyleDefined in graphviz-2999.20.2.0 · Data.GraphViz.Attributes.HTML