UNPKG

@ts-graphviz/common

Version:
929 lines (921 loc) 201 kB
/** * @hidden */ export declare type $keywords<T extends string> = { [key in T]: key; }; /** * @hidden */ export declare interface $keywordsValidation extends $keywords<`${string} ${string}` | `${string}\n${string}` | `${string}\t${string}`> { } /** * A double with an optional prefix `'+'`. * * @see {@link https://graphviz.gitlab.io/docs/attr-types/addDouble/ addDouble} * @group Attribute Types */ export declare type AddDouble = `+${Double}`; /** * A point with an optional prefix `'+'`. * * @see {@link https://graphviz.gitlab.io/docs/attr-types/addPoint/ addPoint} * @group Attribute Types */ export declare type AddPoint = `+${Point}`; /** * The examples above show a set of commonly used arrow shapes. * * There is a grammar of arrow shapes which can be used to describe a collection of 3,111,696 arrow * combinations of the 42 variations of the primitive set of 11 arrows. * * @see {@link https://graphviz.org/docs/attr-types/arrowType/ arrowType} * @group Attribute Types */ export declare type ArrowType = ArrowType.aname | `${ArrowType.aname}${ArrowType.aname}`; /** @hidden */ export declare namespace ArrowType { export type shape = keyof $shape; export interface $shape extends $keywords<'box' | 'crow' | 'curve' | 'icurve' | 'diamond' | 'dot' | 'inv' | 'none' | 'normal' | 'tee' | 'vee'> { } export type side = 'l' | 'r'; export type modifiers = side | 'o' | `o${side}`; export type aname = shape | `${modifiers}${shape}`; } /** * ASTType is an enumeration of the different types of nodes that can be found in an AST(Abstract Syntax Tree ). * @group Models */ export declare type ASTType = 'Literal' | 'Dot' | 'Graph' | 'Attribute' | 'Comment' | 'AttributeList' | 'NodeRef' | 'NodeRefGroup' | 'Edge' | 'Node' | 'Subgraph'; /** * This type represents an Attribute, which is a key-value mapping of an {@link AttributeKey} to a value. * * @param T The {@link AttributeKey} to be mapped to a value. * @group Attribute */ export declare type Attribute<T extends AttributeKey> = Attribute.types[T]; export declare namespace Attribute { export type keys = Omit<$keys, keyof $exclude | symbol | number>; export type types = Omit<$types, keyof $exclude | symbol | number>; /** @hidden */ export interface $keys extends $keywords<AttributeKey> { } export interface $exclude extends $keywordsValidation { } /** * @group Attribute */ export interface $keys { /** * Factor damping force motions. * On each iteration, a nodes movement is limited to this factor of its potential motion. * By being less than 1.0, the system tends to ``cool'', thereby preventing cycling. * * @see {@link https://graphviz.org/docs/attrs/Damping/ Node, Edge and Graph Attributes#Damping} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault 0.99 * @graphvizMinimum 0 * @graphvizNotes neato only * @graphvizUsedBy G * @category Attribute */ Damping: 'Damping'; /** * Spring constant used in virtual physical model. * It roughly corresponds to an ideal edge length (in inches), in that increasing K tends to increase the distance between nodes. * Note that the edge attribute {@link len} can be used to override this value for adjacent nodes. * * @see {@link https://graphviz.org/docs/attrs/K/ Node, Edge and Graph Attributes#K} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault 0.3 * @graphvizMinimum 0 * @graphvizNotes sfdp, fdp only * @graphvizUsedBy GC * @category Attribute */ K: 'K'; /** * Hyperlinks incorporated into device-dependent output. * At present, used in ps2, cmap, i*map and svg formats. * For all these formats, URLs can be attached to nodes, edges and clusters. * URL attributes can also be attached to the root graph in ps2, cmap and i*map formats. * This serves as the base URL for relative URLs in the former, and as the default image map file in the latter. * * For svg, cmapx and imap output, the active area for a node is its visible image. * For example, an unfilled node with no drawn boundary will only be active on its label. * For other output, the active area is its bounding box. * The active area for a cluster is its bounding box. * For edges, the active areas are small circles where the edge contacts its head and tail nodes. * In addition, for svg, cmapx and imap, the active area includes a thin polygon approximating the edge. * The circles may overlap the related node, and the edge URL dominates. * If the edge has a label, this will also be active. Finally, if the edge has a head or tail label, this will also be active. * * Note that, for edges, the attributes {@link headURL}, {@link tailURL}, {@link labelURL} and {@link edgeURL} allow control of various parts of an edge. * Also note that, if active areas of two edges overlap, it is unspecified which area dominates. * * @see {@link https://graphviz.org/docs/attrs/URL/ Node, Edge and Graph Attributes#URL} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault <none> * @graphvizNotes svg, postscript, map only * @graphvizUsedBy ENGC * @category Attribute */ URL: 'URL'; /** * A string in the {@link https://graphviz.org/_pages/doc/info/output.html#d:xdot xdot format} specifying an arbitrary background. * During rendering, the canvas is first filled as described in the {@link bgcolor} attribute. * Then, if _background is defined, the graphics operations described in the string are performed on the canvas. * * @see {@link https://graphviz.org/docs/attrs/_background/ Node, Edge and Graph Attributes#_background} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault <none> * @graphvizUsedBy G * @category Attribute */ _background: '_background'; /** * Indicates the preferred area for a node or empty cluster when laid out by patchwork. * * @see {@link https://graphviz.org/docs/attrs/area/ Node, Edge and Graph Attributes#area} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault 1 * @graphvizMinimum >0 * @graphvizNotes patchwork only * @graphvizUsedBy NC * @category Attribute */ area: 'area'; /** * Style of arrowhead on the head node of an edge. * This will only appear if the {@link dir} attribute is "forward" or "both". * * See the {@link https://graphviz.org/doc/info/attrs.html#undir_note limitation}. * * @see {@link https://graphviz.org/docs/attrs/arrowhead/ Node, Edge and Graph Attributes#arrowhead} * @graphvizType {@link https://graphviz.org/docs/attr-types/arrowType/ arrowType} * @graphvizDefault normal * @graphvizUsedBy E * @category Attribute */ arrowhead: 'arrowhead'; /** * Multiplicative scale factor for arrowheads. * * @see {@link https://graphviz.org/docs/attrs/arrowsize/ Node, Edge and Graph Attributes#arrowsize} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault 1 * @graphvizMinimum 0 * @graphvizUsedBy E * @category Attribute */ arrowsize: 'arrowsize'; /** * Style of arrowhead on the tail node of an edge. * This will only appear if the {@link dir} attribute is "back" or "both". * * See the {@link https://graphviz.org/doc/info/attrs.html#undir_note limitation}. * * @see {@link https://graphviz.org/docs/attrs/arrowtail/ Node, Edge and Graph Attributes#arrowtail} * @graphvizType {@link https://graphviz.org/docs/attr-types/arrowType/ arrowType} * @graphvizDefault normal * @graphvizUsedBy E * @category Attribute */ arrowtail: 'arrowtail'; /** * Bounding box of drawing in points. * * @graphvizType {@link https://graphviz.org/docs/attr-types/rect/ rect} * @graphvizNotes write only * @graphvizUsedBy G * @category Attribute */ bb: 'bb'; /** * When attached to the root graph, this color is used as the background for entire canvas. * When a cluster attribute, it is used as the initial background for the cluster. * If a cluster has a filled {@link style}, the cluster's {@link fillcolor} will overlay the background color. * * @see {@link https://graphviz.org/docs/attrs/bgcolor/ Node, Edge and Graph Attributes#bgcolor} * @graphvizType {@link https://graphviz.org/docs/attr-types/color/ color}/{@link https://graphviz.org/docs/attr-types/color/List colorList} * @graphvizDefault <none> * @graphvizUsedBy GC * @category Attribute */ bgcolor: 'bgcolor'; /** * If true, the drawing is centered in the output canvas. * * @see {@link https://graphviz.org/docs/attrs/center/ Node, Edge and Graph Attributes#center} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault FALSE * @graphvizUsedBy G * @category Attribute */ center: 'center'; /** * Specifies the character encoding used when interpreting string input as a text label. * The default value is "UTF-8". The other legal value is "iso-8859-1" or, equivalently, "Latin1". * The charset attribute is case-insensitive. * Note that if the character encoding used in the input does not match the charset value, the resulting output may be very strange. * * @see {@link https://graphviz.org/docs/attrs/charset/ Node, Edge and Graph Attributes#charset} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "UTF-8" * @graphvizUsedBy G * * @category Attribute */ charset: 'charset'; /** * Classnames to attach to the node, edge, graph, or cluster's SVG element. * Combine with stylesheet for styling SVG output using CSS classnames. * * @see {@link https://graphviz.org/docs/attrs/class/ class} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "" * @graphvizUsedBy ENCG */ class: 'class'; /** * Mode used for handling clusters. * If clusterrank is "local", a subgraph whose name begins with "cluster" is given special treatment. * The subgraph is laid out separately, and then integrated as a unit into its parent graph, with a bounding rectangle drawn about it. * If the cluster has a label parameter, this label is displayed within the rectangle. * Note also that there can be clusters within clusters. * At present, the modes "global" and "none" appear to be identical, both turning off the special cluster processing. * * @see {@link https://graphviz.org/docs/attrs/clusterrank/ Node, Edge and Graph Attributes#clusterrank} * @graphvizType {@link https://graphviz.org/_pages/doc/info/attrs.html#k:clusterMode clusterMode} * @graphvizDefault local * @graphvizNotes dot only * @graphvizUsedBy G * @category Attribute */ clusterrank: 'clusterrank'; /** * Basic drawing color for graphics, not text. * For the latter, use the fontcolor attribute. * * For edges, the value can either be a single color or a colorList. * In the latter case, if colorList has no fractions, the edge is drawn using parallel splines or lines, one for each color in the list, in the order given. * The head arrow, if any, is drawn using the first color in the list, and the tail arrow, if any, the second color. * This supports the common case of drawing opposing edges, but using parallel splines instead of separately routed multiedges. * If any fraction is used, the colors are drawn in series, with each color being given roughly its specified fraction of the edge. * For example, the graph * * ```dot * digraph G { * a -> b [dir=both color="red:blue"] * c -> d [dir=none color="green:red;0.25:blue"] * } * ``` * * yields * * ![colorlist](https://graphviz.org/_pages/doc/info/colorlist.gif) * * @see {@link https://graphviz.org/docs/attrs/color/ Node, Edge and Graph Attributes#color} * @graphvizType {@link https://graphviz.org/docs/attr-types/color/ color}/{@link https://graphviz.org/docs/attr-types/color/List colorList} * @graphvizDefault black * @graphvizUsedBy ENC * @category Attribute */ color: 'color'; /** * This attribute specifies a color scheme namespace. * If defined, it specifies the context for interpreting color names. * In particular, if a color value has form "xxx" or "//xxx", then the color xxx will be evaluated according to the current color scheme. * If no color scheme is set, the standard X11 naming is used. * For example, if colorscheme=bugn9, then color=7 is interpreted as "/bugn9/7". * * @see {@link https://graphviz.org/docs/attrs/colorscheme/ Node, Edge and Graph Attributes#colorscheme} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "" * @graphvizUsedBy ENCG * @category Attribute */ colorscheme: 'colorscheme'; /** * Comments are inserted into output. * Device-dependent * * @see {@link https://graphviz.org/docs/attrs/comment/ Node, Edge and Graph Attributes#comment} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "" * @graphvizUsedBy ENG * @category Attribute */ comment: 'comment'; /** * If true, allow edges between clusters. (See {@link lhead} and {@link ltail} below.) * * @see {@link https://graphviz.org/docs/attrs/compound/ Node, Edge and Graph Attributes#compound} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault FALSE * @graphvizNotes dot only * @graphvizUsedBy G * @category Attribute */ compound: 'compound'; /** * If true, use edge concentrators. * This merges multiedges into a single edge and causes partially parallel edges to share part of their paths. * The latter feature is not yet available outside of dot. * * @see {@link https://graphviz.org/docs/attrs/concentrate/ Node, Edge and Graph Attributes#concentrate} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault FALSE * @graphvizUsedBy G * @category Attribute */ concentrate: 'concentrate'; /** * If false, the edge is not used in ranking the nodes. * For example, in the graph * * ```graphviz * digraph G { * a -> c; * a -> b; * b -> c [constraint=false]; * } * ``` * * the edge `b -> c` does not add a constraint during rank assignment, so the only constraints are that a be above b and c, yielding the graph: * * ![constraint](https://graphviz.org/_pages/doc/info/constraint.gif) * * @see {@link https://graphviz.org/docs/attrs/constraint/ Node, Edge and Graph Attributes#constraint} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault TRUE * @graphvizNotes dot only * @graphvizUsedBy E * @category Attribute */ constraint: 'constraint'; /** * If true, attach edge label to edge by a 2-segment polyline, underlining the label, then going to the closest point of spline. * * @see {@link https://graphviz.org/docs/attrs/decorate/ Node, Edge and Graph Attributes#decorate} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault FALSE * @graphvizUsedBy E * @category Attribute */ decorate: 'decorate'; /** * This specifies the distance between nodes in separate connected components. * If set too small, connected components may overlap. Only applicable if {@link pack}=false. * * @see {@link https://graphviz.org/docs/attrs/defaultdist/ Node, Edge and Graph Attributes#defaultdist} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault 1+(avg. len)*sqrt(|V|) * @graphvizMinimum epsilon * @graphvizNotes neato only * @graphvizUsedBy G * @category Attribute */ defaultdist: 'defaultdist'; /** * Set the number of dimensions used for the layout. * The maximum value allowed is 10. * * @see {@link https://graphviz.org/docs/attrs/dim/ Node, Edge and Graph Attributes#dim} * @graphvizType {@link https://graphviz.org/docs/attr-types/int/ int} * @graphvizDefault 2 * @graphvizMinimum 2 * @graphvizNotes sfdp, fdp, neato only * @graphvizUsedBy G * @category Attribute */ dim: 'dim'; /** * Set the number of dimensions used for rendering. * The maximum value allowed is 10. * If both dimen and dim are set, the latter specifies the dimension used for layout, and the former for rendering. * If only dimen is set, this is used for both layout and rendering dimensions. * * Note that, at present, all aspects of rendering are 2D. * This includes the shape and size of nodes, overlap removal, and edge routing. * Thus, for dimen > 2, the only valid information is the pos attribute of the nodes. * All other coordinates will be 2D and, at best, will reflect a projection of a higher-dimensional point onto the plane. * * @see {@link https://graphviz.org/docs/attrs/dimen/ Node, Edge and Graph Attributes#dimen} * @graphvizType {@link https://graphviz.org/docs/attr-types/int/ int} * @graphvizDefault 2 * @graphvizMinimum 2 * @graphvizNotes sfdp, fdp, neato only * @graphvizUsedBy G * @category Attribute */ dimen: 'dimen'; /** * Set edge type for drawing arrowheads. * This indicates which ends of the edge should be decorated with an arrowhead. * The actual style of the arrowhead can be specified using the {@link arrowhead} and {@link arrowtail} attributes. * See {@link https://graphviz.org/doc/info/attrs.html#undir_note limitation}. * * @see {@link https://graphviz.org/docs/attrs/dir/ Node, Edge and Graph Attributes#dir} * @graphvizType {@link https://graphviz.org/docs/attr-types/dirType/ dirType} * @graphvizDefault "forward(directed) none(undirected)" * @graphvizUsedBy E * @category Attribute */ dir: 'dir'; /** * Only valid when {@link mode}="ipsep". * If true, constraints are generated for each edge in the largest (heuristic) directed acyclic subgraph such that the edge must point downwards. * If "hier", generates level constraints similar to those used with {@link mode}="hier". * The main difference is that, in the latter case, only these constraints are involved, so a faster solver can be used. * * @see {@link https://graphviz.org/docs/attrs/diredgeconstraints/ Node, Edge and Graph Attributes#diredgeconstraints} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string}/{@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault FALSE * @graphvizNotes neato only * @graphvizUsedBy G * @category Attribute */ diredgeconstraints: 'diredgeconstraints'; /** * Distortion factor for {@link shape}=polygon. * Positive values cause top part to be larger than bottom; negative values do the opposite. * * @see {@link https://graphviz.org/docs/attrs/distortion/ Node, Edge and Graph Attributes#distortion} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault -100 * @graphvizUsedBy N * @category Attribute */ distortion: 'distortion'; /** * This specifies the expected number of pixels per inch on a display device. * For bitmap output, this guarantees that text rendering will be done more accurately, both in size and in placement. * For SVG output, it is used to guarantee that the dimensions in the output correspond to the correct number of points or inches. * * @see {@link https://graphviz.org/docs/attrs/dpi/ Node, Edge and Graph Attributes#dpi} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault "96.0 0.0" * @graphvizNotes svg, bitmap output only * @graphvizUsedBy G * @category Attribute */ dpi: 'dpi'; /** * If **edgeURL** is defined, this is the link used for the non-label parts of an edge. * This value overrides any {@link URL} defined for the edge. * Also, this value is used near the head or tail node unless overridden by a {@link headURL} or {@link tailURL} value, respectively. * See {@link https://graphviz.org/doc/info/attrs.html#undir_note limitation}. * * @see {@link https://graphviz.org/docs/attrs/edgeURL/ Node, Edge and Graph Attributes#edgeURL} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizNotes svg, map only * @graphvizUsedBy E * @category Attribute */ edgeURL: 'edgeURL'; /** * Synonym for {@link edgeURL}. * * @see {@link https://graphviz.org/docs/attrs/edgehref/ Node, Edge and Graph Attributes#edgehref} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizNotes svg, map only * @graphvizUsedBy E * @category Attribute */ edgehref: 'edgehref'; /** * If the edge has a {@link URL} or {@link edgeURL} attribute, this attribute determines which window of the browser is used for the URL attached to the non-label part of the edge. * Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does. * If undefined, the value of the {@link target} is used. * * @see {@link https://graphviz.org/docs/attrs/edgetarget/ Node, Edge and Graph Attributes#edgetarget} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault <none> * @graphvizNotes svg, map only * @graphvizUsedBy E * @category Attribute */ edgetarget: 'edgetarget'; /** * Tooltip annotation attached to the non-label part of an edge. * This is used only if the edge has a {@link URL} or {@link edgeURL} attribute. * * @see {@link https://graphviz.org/docs/attrs/edgetooltip/ Node, Edge and Graph Attributes#edgetooltip} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizNotes svg, cmap only * @graphvizUsedBy E * @category Attribute */ edgetooltip: 'edgetooltip'; /** * Terminating condition. If the length squared of all energy gradients are < **epsilon**, the algorithm stops. * * @see {@link https://graphviz.org/docs/attrs/epsilon/ Node, Edge and Graph Attributes#epsilon} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault .0001 * # nodes(mode == KK) .0001(mode == major) * @graphvizNotes neato only * @graphvizUsedBy G * @category Attribute */ epsilon: 'epsilon'; /** * Margin used around polygons for purposes of spline edge routing. * The interpretation is the same as given for {@link sep}. * This should normally be strictly less than {@link sep}. * * @see {@link https://graphviz.org/docs/attrs/esep/ Node, Edge and Graph Attributes#esep} * @graphvizType {@link https://graphviz.org/docs/attr-types/addDouble/ addDouble}/{@link https://graphviz.org/_pages/doc/info/attrs.html#k:addPoint addPoint} * @graphvizDefault 3 * @graphvizNotes not dot * @graphvizUsedBy G * @category Attribute */ esep: 'esep'; /** * Color used to fill the background of a node or cluster assuming {@link style}=filled, or a filled arrowhead. * If fillcolor is not defined, {@link color} is used. (For clusters, if color is not defined, {@link bgcolor} is used.) * If this is not defined, the default is used, except for {@link shape}=point or when the output format is MIF, which use black by default. * * If the value is a {@link colorList}, a gradient fill is used. * By default, this is a linear fill; setting style=radial will cause a radial fill. * At present, only two colors are used. If the second color (after a colon) is missing, the default color is used for it. * See also the {@link gradientangle} attribute for setting the gradient angle. * * Note that a cluster inherits the root graph's attributes if defined. * Thus, if the root graph has defined a **fillcolor**, this will override a **color** or **bgcolor** attribute set for the cluster. * * @see {@link https://graphviz.org/docs/attrs/fillcolor/ Node, Edge and Graph Attributes#fillcolor} * @graphvizType {@link https://graphviz.org/docs/attr-types/color/ color}/{@link https://graphviz.org/docs/attr-types/color/List colorList} * @graphvizDefault "lightgrey(nodes) black(clusters)" * @graphvizUsedBy NEC * @category Attribute */ fillcolor: 'fillcolor'; /** * If `false`, the size of a node is determined by smallest width and height needed to contain its label and image, * if any, with a {@link margin} specified by the margin attribute. * The width and height must also be at least as large as the sizes specified by the {@link width} and {@link height} attributes, * which specify the minimum values for these parameters. * * If `true`, the node size is specified by the values of the {@link width} and {@link height} attributes only and is not expanded to contain the text label. * There will be a warning if the label (with margin) cannot fit within these limits. * * If the {@link fixedsize} attribute is set to shape, the {@link width} and {@link height} attributes also determine the size of the node shape, * but the label can be much larger. Both the label and shape sizes are used when avoiding node overlap, * but all edges to the node ignore the label and only contact the node shape. No warning is given if the label is too large. * * @see {@link https://graphviz.org/docs/attrs/fixedsize/ Node, Edge and Graph Attributes#fixedsize} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool}/string * @graphvizDefault FALSE * @graphvizUsedBy N * @category Attribute */ fixedsize: 'fixedsize'; /** * Color used for text. * * @see {@link https://graphviz.org/docs/attrs/fontcolor/ Node, Edge and Graph Attributes#fontcolor} * @graphvizType {@link https://graphviz.org/docs/attr-types/color/ color} * @graphvizDefault black * @graphvizUsedBy ENGC * @category Attribute */ fontcolor: 'fontcolor'; /** * Font used for text. * This very much depends on the output format and, for non-bitmap output such as PostScript or SVG, * the availability of the font when the graph is displayed or printed. * As such, it is best to rely on font faces that are generally available, * such as Times-Roman, Helvetica or Courier. * * How font names are resolved also depends on the underlying library that handles font name resolution. * If Graphviz was built using the fontconfig library, the latter library will be used to search for the font. * See the commands **fc-list**, **fc-match** and the other fontconfig commands for how names are resolved and which fonts are available. * Other systems may provide their own font package, such as Quartz for OS X. * * Note that various font attributes, such as weight and slant, can be built into the font name. * Unfortunately, the syntax varies depending on which font system is dominant. Thus, using fontname="times bold italic" will produce a bold, slanted Times font using Pango, the usual main font library. * Alternatively, fontname="times:italic" will produce a slanted Times font from fontconfig, while fontname="times-bold" will resolve to a bold Times using Quartz. * You will need to ascertain which package is used by your Graphviz system and refer to the relevant documentation. * * If Graphviz is not built with a high-level font library, fontname will be considered the name of a Type 1 or True Type font file. * If you specify fontname=schlbk, the tool will look for a file named schlbk.ttf or schlbk.pfa or schlbk.pfb in one of the directories specified by the {@link fontpath} attribute. * The lookup does support various aliases for the common fonts. * * @see {@link https://graphviz.org/docs/attrs/fontname/ Node, Edge and Graph Attributes#fontname} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "Times-Roman" * @graphvizUsedBy ENGC * @category Attribute */ fontname: 'fontname'; /** * Allows user control of how basic fontnames are represented in SVG output. * If fontnames is undefined or "svg", the output will try to use known SVG fontnames. * For example, the default font "Times-Roman" will be mapped to the basic SVG font "serif". * This can be overridden by setting fontnames to "ps" or "gd". In the former case, known PostScript font names such as "Times-Roman" will be used in the output. * In the latter case, the fontconfig font conventions are used. Thus, "Times-Roman" would be treated as "Nimbus Roman No9 L". * These last two options are useful with SVG viewers that support these richer fontname spaces. * * @see {@link https://graphviz.org/docs/attrs/fontnames/ Node, Edge and Graph Attributes#fontnames} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "" * @graphvizNotes svg only * @graphvizUsedBy G * @category Attribute */ fontnames: 'fontnames'; /** * Directory list used by libgd to search for bitmap fonts if Graphviz was not built with the fontconfig library. * If **fontpath** is not set, the environment variable DOTFONTPATH is checked. * If that is not set, GDFONTPATH is checked. * If not set, libgd uses its compiled-in font path. * Note that fontpath is an attribute of the root graph. * * @see {@link https://graphviz.org/docs/attrs/fontpath/ Node, Edge and Graph Attributes#fontpath} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault system-dependent * @graphvizUsedBy G * @category Attribute */ fontpath: 'fontpath'; /** * Font size, {@link https://graphviz.org/doc/info/attrs.html in points}, used for text. * * @see {@link https://graphviz.org/docs/attrs/fontsize/ Node, Edge and Graph Attributes#fontsize} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault 14 * @graphvizMinimum 1 * @graphvizUsedBy ENGC * @category Attribute */ fontsize: 'fontsize'; /** * If true, all {@link xlabel} attributes are placed, * even if there is some overlap with nodes or other labels. * * @see {@link https://graphviz.org/docs/attrs/forcelabels/ Node, Edge and Graph Attributes#forcelabels} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault TRUE * @graphvizUsedBy G * @category Attribute */ forcelabels: 'forcelabels'; /** * If a gradient fill is being used, this determines the angle of the fill. * For linear fills, the colors transform along a line specified by the angle and the center of the object. * For radial fills, a value of zero causes the colors to transform radially from the center; for non-zero values, * the colors transform from a point near the object's periphery as specified by the value. * * If unset, the default angle is 0. * * @see {@link https://graphviz.org/docs/attrs/gradientangle/ Node, Edge and Graph Attributes#gradientangle} * @graphvizType {@link https://graphviz.org/docs/attr-types/int/ int} * @graphvizDefault "" * @graphvizUsedBy NCG * @category Attribute */ gradientangle: 'gradientangle'; /** * If the end points of an edge belong to the same group, i.e., * have the same group attribute, parameters are set to avoid crossings and keep the edges straight. * * @see {@link https://graphviz.org/docs/attrs/group/ Node, Edge and Graph Attributes#group} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "" * @graphvizNotes dot only * @graphvizUsedBy N * @category Attribute */ group: 'group'; /** * If **headURL** is defined, it is output as part of the head label of the edge. * Also, this value is used near the head node, overriding any {@link URL} value. * See {@link https://graphviz.org/doc/info/attrs.html#undir_note limitation}. * * @see {@link https://graphviz.org/docs/attrs/headURL/ Node, Edge and Graph Attributes#headURL} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizNotes svg, map only * @graphvizUsedBy E * @category Attribute */ headURL: 'headURL'; /** * Position of an edge's head label, {@link https://graphviz.org/doc/info/attrs.html in points}. * The position indicates the center of the label. * * @see {@link https://graphviz.org/docs/attrs/head_lp/ Node, Edge and Graph Attributes#head_lp} * @graphvizType {@link https://graphviz.org/docs/attr-types/point/ point} * @graphvizNotes write only * @graphvizUsedBy E * @category Attribute */ head_lp: 'head_lp'; /** * If true, the head of an edge is clipped to the boundary of the head node; otherwise, * the end of the edge goes to the center of the node, or the center of a port, if applicable. * * @see {@link https://graphviz.org/docs/attrs/headclip/ Node, Edge and Graph Attributes#headclip} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool} * @graphvizDefault TRUE * @graphvizUsedBy E * @category Attribute */ headclip: 'headclip'; /** * Synonym for {@link headURL}. * * @see {@link https://graphviz.org/docs/attrs/headhref/ Node, Edge and Graph Attributes#headhref} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizNotes svg, map only * @graphvizUsedBy E * @category Attribute */ headhref: 'headhref'; /** * Text label to be placed near head of edge. * See {@link https://graphviz.org/doc/info/attrs.html#undir_note limitation}. * * @see {@link https://graphviz.org/docs/attrs/headlabel/ Node, Edge and Graph Attributes#headlabel} * @graphvizType {@link https://graphviz.org/docs/attr-types/lblString/ lblString} * @graphvizDefault center * @graphvizUsedBy E * @category Attribute */ headlabel: 'headlabel'; /** * Indicates where on the head node to attach the head of the edge. * In the default case, the edge is aimed towards the center of the node, and then clipped at the node boundary. * See {@link https://graphviz.org/doc/info/attrs.html#undir_note limitation}. * * @see {@link https://graphviz.org/docs/attrs/headport/ Node, Edge and Graph Attributes#headport} * @graphvizType {@link https://graphviz.org/docs/attr-types/portPos/ portPos} * @graphvizDefault <none> * @graphvizNotes svg, map only * @graphvizUsedBy E * @category Attribute */ headport: 'headport'; /** * If the edge has a {@link headURL}, this attribute determines which window of the browser is used for the URL. * Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does. * If undefined, the value of the {@link target} is used. * * @see {@link https://graphviz.org/docs/attrs/headtarget/ Node, Edge and Graph Attributes#headtarget} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizNotes svg, cmap only * @graphvizUsedBy E * @category Attribute */ headtarget: 'headtarget'; /** * Tooltip annotation attached to the head of an edge. * This is used only if the edge has a {@link headURL} attribute. * * @see {@link https://graphviz.org/docs/attrs/headtooltip/ Node, Edge and Graph Attributes#headtooltip} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault 0.5 * @graphvizMinimum 0.02 * @graphvizUsedBy N * @category Attribute */ headtooltip: 'headtooltip'; /** * Height of node, in inches. * This is taken as the initial, minimum height of the node. * If {@link fixedsize} is true, this will be the final height of the node. * Otherwise, if the node label requires more height to fit, the node's **height** will be increased to contain the label. * Note also that, if the output format is dot, the value given to height will be the final value. * * If the node shape is regular, the width and height are made identical. * In this case, if either the width or the height is set explicitly, that value is used. * In this case, if both the width or the height are set explicitly, the maximum of the two values is used. * If neither is set explicitly, the minimum of the two default values is used. * * @see {@link https://graphviz.org/docs/attrs/height/ Node, Edge and Graph Attributes#height} * @graphvizType {@link https://graphviz.org/docs/attr-types/double/ double} * @graphvizDefault "" * @graphvizNotes svg, postscript, map only * @graphvizUsedBy GCNE * @category Attribute */ height: 'height'; /** * Synonym for {@link URL}. * * @see {@link https://graphviz.org/docs/attrs/href/ Node, Edge and Graph Attributes#href} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizNotes svg, postscript, map only * @graphvizUsedBy GCNE * @category Attribute */ href: 'href'; /** * Allows the graph author to provide an id for graph objects which is to be included in the output. * Normal "\N", "\E", "\G" substitutions are applied. * If provided, it is the responsibility of the provider to keep its values sufficiently unique for its intended downstream use. * Note, in particular, that "\E" does not provide a unique id for multi-edges. * If no id attribute is provided, then a unique internal id is used. * However, this value is unpredictable by the graph writer. * An externally provided id is not used internally. * * If the graph provides an id attribute, this will be used as a prefix for internally generated attributes. * By making these distinct, the user can include multiple image maps in the same document. * * @see {@link https://graphviz.org/docs/attrs/id/ Node, Edge and Graph Attributes#id} * @graphvizType {@link https://graphviz.org/docs/attr-types/escString/ escString} * @graphvizDefault "" * @graphvizUsedBy N * @category Attribute */ id: 'id'; /** * Gives the name of a file containing an image to be displayed inside a node. * The image file must be in one of the recognized {@link https://graphviz.org/docs/outputs/ formats}, * typically JPEG, PNG, GIF, BMP, SVG or Postscript, and be able to be converted into the desired output format. * * The file must contain the image size information. * This is usually trivially true for the bitmap formats. * For PostScript, the file must contain a line starting with %%BoundingBox: followed by four integers specifying the lower left x and y coordinates and the upper right x and y coordinates of the bounding box for the image, the coordinates being in points. * An SVG image file must contain width and height attributes, typically as part of the svg element. * The values for these should have the form of a floating point number, followed by optional units, e.g., * width="76pt". Recognized units are in, px, pc, pt, cm and mm for inches, pixels, picas, points, centimeters and millimeters, respectively. * The default unit is points. * * Unlike with the {@link shapefile} attribute, the image is treated as node content rather than the entire node. In particular, an image can be contained in a node of any shape, not just a rectangle. * * @see {@link https://graphviz.org/docs/attrs/image/ Node, Edge and Graph Attributes#image} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "" * @graphvizUsedBy G * @category Attribute */ image: 'image'; /** * Specifies a list of directories in which to look for image files as specified by the {@link image} attribute or using the IMG element in {@link https://graphviz.org/doc/info/shapes.html HTML-like labels}. * The string should be a list of (absolute or relative) pathnames, each separated by a semicolon (for Windows) or a colon (all other OS). * The first directory in which a file of the given name is found will be used to load the image. * If imagepath is not set, relative pathnames for the image file will be interpreted with respect to the current working directory. * * @see {@link https://graphviz.org/docs/attrs/imagepath/ Node, Edge and Graph Attributes#imagepath} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "" * @graphvizUsedBy G * @category Attribute */ imagepath: 'imagepath'; /** * Attribute controlling how an image is positioned within its containing node. * This only has an effect when the image is smaller than the containing node. * The default is to be centered both horizontally and vertically. * Valid values: * * | | | * |----|-------------------------------| * | tl | Top Left | * | tc | Top Centered | * | tr | Top Right | * | ml | Middle Left | * | mc | Middle Centered (the default) | * | mr | Middle Right | * | bl | Bottom Left | * | bc | Bottom Centered | * | br | Bottom Right | * * @see {@link https://graphviz.org/docs/attrs/imagepos/ Node, Edge and Graph Attributes#imagepos} * @graphvizType {@link https://graphviz.org/docs/attr-types/string/ string} * @graphvizDefault "mc" * @graphvizUsedBy N * @category Attribute */ imagepos: 'imagepos'; /** * Attribute controlling how an image fills its containing node. * In general, the image is given its natural size, (cf. {@link dpi}), and the node size is made large enough to contain its image, its label, its margin, and its peripheries. * Its width and height will also be at least as large as its minimum {@link width} and {@link height}. * If, however, fixedsize=true, the width and height attributes specify the exact size of the node. * * During rendering, in the default case (imagescale=false), the image retains its natural size. If imagescale=true, the image is uniformly scaled (i.e., its aspect ratio is preserved) to fit inside the node. At least one dimension of the image will be as large as possible given the size of the node. When imagescale=width, the width of the image is scaled to fill the node width. The corresponding property holds when imagescale=height. When imagescale=both, both the height and the width are scaled separately to fill the node. * * In all cases, if a dimension of the image is larger than the corresponding dimension of the node, * that dimension of the image is scaled down to fit the node. * As with the case of expansion, if imagescale=true, width and height are scaled uniformly. * * @see {@link https://graphviz.org/docs/attrs/imagescale/ Node, Edge and Graph Attributes#imagescale} * @graphvizType {@link https://graphviz.org/docs/attr-types/bool bool}/string * @graphvizDefault FALSE * @graphvizUsedBy N * @category Attribute */ imagescale: 'imagescale'; /** * For layout algorithms that support initial input positions (specified by the pos attribute), * this attribute can be used to appropriately