@graphty/graph-io / styles / NodeStyleValues
Interface: NodeStyleValues ​
Defined in: styles/types.ts:148
The neutral node properties and the type of each value. Lengths are in the unit FileStyles.units.length names; opacities are 0..1.
Properties ​
borderColor ​
readonlyborderColor:`#${string}`
Defined in: styles/types.ts:175
The border (outline) color.
borderOpacity ​
readonlyborderOpacity:number
Defined in: styles/types.ts:183
The opacity of the border alone, 0..1 (0 draws no border).
borderPosition ​
readonlyborderPosition:StyleBorderPosition
Defined in: styles/types.ts:267
Where the border sits against the node's width and height.
borderStyle ​
readonlyborderStyle:StyleBorderStyle
Defined in: styles/types.ts:265
The border's line style.
borderWaveAmplitude ​
readonlyborderWaveAmplitude:number
Defined in: styles/types.ts:272
How far a zigzag or sine-wave border swings to either side of the ring's middle (a length; Cytoscape desktop's strokes swing 10 px). With it, borderWidth is the thickness of the waving line.
borderWavePeriod ​
readonlyborderWavePeriod:number
Defined in: styles/types.ts:274
How far round the node a zigzag or sine-wave border runs before it repeats (a length; Cytoscape's: 20 px).
borderWidth ​
readonlyborderWidth:number
Defined in: styles/types.ts:189
The border width (0 is no border).
chartBorderColor ​
readonlychartBorderColor:`#${string}`
Defined in: styles/types.ts:518
The color of a bar's and a box's outline.
chartBorderWidth ​
readonlychartBorderWidth:number
Defined in: styles/types.ts:520
How wide a bar's and a box's outline is (a length); unset, none.
chartColors ​
readonlychartColors:string
Defined in: styles/types.ts:502
The chart's colors, #rrggbb separated by spaces: item i in color i, the last color for the rest.
chartGap ​
readonlychartGap:number
Defined in: styles/types.ts:514
How much of the category side is left between the categories in all, as a fraction of it; unset, 0.
chartHorizontal ​
readonlychartHorizontal:boolean
Defined in: styles/types.ts:508
Whether the values run left to right (true) or bottom to top (unset); the categories run the other way.
chartKind ​
readonlychartKind:string
Defined in: styles/types.ts:498
A chart drawn over the node (Cytoscape's bar, line, box and heat map charts): bar (bars side by side), stacked-bar (the values piled into one bar), line, box (the values are the low whisker, the lower quartile, the median, the upper quartile and the high whisker) or cells (a row of colored cells).
chartLineWidth ​
readonlychartLineWidth:number
Defined in: styles/types.ts:516
How wide the chart draws a line and a whisker (a length).
chartMargin ​
readonlychartMargin:number
Defined in: styles/types.ts:512
How much of the category side is left empty at each end, as a fraction of it; unset, 0.
chartMax ​
readonlychartMax:number
Defined in: styles/types.ts:506
The value at the end of the chart's value axis; unset, the greatest value.
chartMin ​
readonlychartMin:number
Defined in: styles/types.ts:504
The value at the start of the chart's value axis; unset, the smaller of 0 and the least value.
chartSize ​
readonlychartSize:number
Defined in: styles/types.ts:510
The size of the chart's plot box, as a fraction of the node's; unset, 1.
chartValues ​
readonlychartValues:string
Defined in: styles/types.ts:500
The chart's values, numbers separated by spaces, in the order they are drawn.
cornerRadius ​
readonlycornerRadius:number
Defined in: styles/types.ts:191
A rounded rectangle's corner radius, in the units of width and height.
fill ​
readonlyfill:`#${string}`
Defined in: styles/types.ts:150
The fill color.
fillGradient ​
readonlyfillGradient:`#${string}`
Defined in: styles/types.ts:155
The color a linear gradient fill runs into: the fill is fill at the start of the gradient and this at its end. Unset, the fill is flat.
fillGradientAngle ​
readonlyfillGradientAngle:number
Defined in: styles/types.ts:160
Which way a gradient fill runs, in degrees on the screen: 0 from left to right, 90 from top to bottom, 45 from the top-left corner to the bottom-right one. Unset, 0.
fillGradientColors ​
readonlyfillGradientColors:string
Defined in: styles/types.ts:166
Every color a gradient fill runs through, from its start to its end, #rrggbb separated by spaces (Cytoscape.js background-gradient-stop-colors), in place of fill and fillGradient for the gradient. Unset, the gradient runs from fill into fillGradient.
fillGradientKind ​
readonlyfillGradientKind:string
Defined in: styles/types.ts:173
How a gradient fill runs: linear across the node (fillGradientAngle), or radial out from its middle.
fillGradientStops ​
readonlyfillGradientStops:string
Defined in: styles/types.ts:171
Where each color of a gradient fill sits, fractions from 0 to 1 separated by spaces, one per color (fillGradientColors, else fill and fillGradient); absent, evenly spaced.
fillOpacity ​
readonlyfillOpacity:number
Defined in: styles/types.ts:179
The opacity of the fill alone, 0..1 (0 is an unfilled node).
glyph ​
readonlyglyph:string
Defined in: styles/types.ts:450
A character or short text drawn over the node, centered on it (vis-network's icon nodes: an icon font's glyph), in glyphFont (a CSS font family) at glyphSize (the font's size, in the units of width), glyphWeight and glyphColor.
glyphColor ​
readonlyglyphColor:string
Defined in: styles/types.ts:458
The glyph's color.
glyphFont ​
readonlyglyphFont:string
Defined in: styles/types.ts:452
The glyph's CSS font family.
glyphSize ​
readonlyglyphSize:number
Defined in: styles/types.ts:454
The glyph's font size, in the units of width.
glyphWeight ​
readonlyglyphWeight:StyleLabelWeight
Defined in: styles/types.ts:456
The glyph's weight.
height ​
readonlyheight:number
Defined in: styles/types.ts:187
The height.
image ​
readonlyimage:string
Defined in: styles/types.ts:411
The URI of an image drawn on the node.
imageAutoSize ​
readonlyimageAutoSize:string
Defined in: styles/types.ts:442
How an image whose imageFit is none fills the side imageWidth or imageHeight leaves unset: proportional (unset) keeps its proportions to the side given; natural draws it at its own pixels (Cytoscape.js's auto).
imageClip ​
readonlyimageClip:string
Defined in: styles/types.ts:435
node (unset) keeps the image inside the node's outline; none lets it reach past.
imageFallback ​
readonlyimageFallback:string
Defined in: styles/types.ts:419
The image drawn instead when image cannot be loaded (vis-network's brokenImage).
imageFit ​
readonlyimageFit:string
Defined in: styles/types.ts:417
How the image is sized against the node: contain (keeps its proportions inside the node), cover (keeps them over the whole node), fill (stretched to the node), or none (imageWidth x imageHeight, else its own pixels, one length each). Unset, contain.
imageHeight ​
readonlyimageHeight:number
Defined in: styles/types.ts:423
The image's height where imageFit is none (a length).
imageOffsetX ​
readonlyimageOffsetX:number
Defined in: styles/types.ts:429
How far right the image is moved from there (a length).
imageOffsetY ​
readonlyimageOffsetY:number
Defined in: styles/types.ts:431
How far down the image is moved from there (a length).
imageOpacity ​
readonlyimageOpacity:number
Defined in: styles/types.ts:444
The image's opacity, 0..1.
imagePositionX ​
readonlyimagePositionX:number
Defined in: styles/types.ts:425
Where the image sits across the room the node leaves it, 0 (left) to 1 (right); unset, 0.5.
imagePositionY ​
readonlyimagePositionY:number
Defined in: styles/types.ts:427
Where the image sits up and down the room the node leaves it, 0 (top) to 1 (bottom); unset, 0.5.
imageRepeat ​
readonlyimageRepeat:string
Defined in: styles/types.ts:433
Whether the image is tiled: no-repeat (unset), repeat, repeat-x or repeat-y.
imageSmoothing ​
readonlyimageSmoothing:boolean
Defined in: styles/types.ts:437
Whether the image's pixels are smoothed when it is scaled; false draws them as squares. Unset, true.
imageWidth ​
readonlyimageWidth:number
Defined in: styles/types.ts:421
The image's width where imageFit is none (a length); with only imageHeight, its proportions decide.
label ​
readonlylabel:string
Defined in: styles/types.ts:312
The label text, as the tool draws it.
labelAvoidOverlap ​
readonlylabelAvoidOverlap:boolean
Defined in: styles/types.ts:361
Whether the label is left out where it would overlap the label of another node drawn before it, the larger label (then the larger node) first, as Gephi's Preview (node.label.avoidOverlap) thins out labels. Unset or false, the label is drawn wherever it falls.
labelBackground ​
readonlylabelBackground:`#${string}`
Defined in: styles/types.ts:383
The color of a box drawn behind the label's text (vis-network font.background).
labelBackgroundOpacity ​
readonlylabelBackgroundOpacity:number
Defined in: styles/types.ts:385
The opacity of that box, 0..1.
labelBorderColor ​
readonlylabelBorderColor:`#${string}`
Defined in: styles/types.ts:394
The color of a line drawn round the box behind the label's words (yEd lineColor).
labelBorderOpacity ​
readonlylabelBorderOpacity:number
Defined in: styles/types.ts:400
How opaque the line round the box behind the label's words is, from 0 (none) to 1, over its color. Unset, 1.
labelBorderWidth ​
readonlylabelBorderWidth:number
Defined in: styles/types.ts:396
How thick that line is, in the units of labelSize; 0 draws none.
labelColor ​
readonlylabelColor:`#${string}`
Defined in: styles/types.ts:177
The label's text color.
labelCornerRadius ​
readonlylabelCornerRadius:number
Defined in: styles/types.ts:407
How far the corners of the box behind the label's words are rounded, in the units of labelSize. Unset, square.
labelFit ​
readonlylabelFit:StyleLabelFit
Defined in: styles/types.ts:224
Whether and how the node grows to hold its label; unset, width and height are its size.
labelFitSquare ​
readonlylabelFitSquare:boolean
Defined in: styles/types.ts:230
Whether a node that grows to fit its label stays as wide as it is tall (a circle, a square).
labelFont ​
readonlylabelFont:string
Defined in: styles/types.ts:326
The label's font family, as the file names it.
labelGridCellSize ​
readonlylabelGridCellSize:number
Defined in: styles/types.ts:374
The node labels are thinned by a grid of square cells this many px across, laid over the drawing as the program first frames it in its canvas (its positions fitted to the canvas): each cell draws the label of its largest node only (then the lesser id), and more of them as the view zooms in, n x n times as many at n times the zoom (sigma.js's labelGridCellSize, labelDensity 1). Unset, no grid thins the labels.
labelItalic ​
readonlylabelItalic:boolean
Defined in: styles/types.ts:330
Whether the label is italic.
labelLineHeight ​
readonlylabelLineHeight:number
Defined in: styles/types.ts:409
How tall one line of the label is, as a multiple of its font's ascent plus descent. Unset, 1.2.
labelMinNodeScreenSize ​
readonlylabelMinNodeScreenSize:number
Defined in: styles/types.ts:367
The label is not drawn while its node is drawn smaller than this many screen pixels across (the smaller of its width and height): a screen size, not a length, so it is never scaled with the file's lengths (sigma.js's labelRenderedSizeThreshold, a radius of 6 px). Unset, the node's size never hides its label.
labelMinScreenSize ​
readonlylabelMinScreenSize:number
Defined in: styles/types.ts:355
The label is not drawn while its letters are drawn smaller than this many screen pixels: a screen size, not a length, so it is never scaled with the file's lengths (vis-network's scaling.label.drawThreshold). Unset, the label is drawn at any size.
labelOffsetX ​
readonlylabelOffsetX:number
Defined in: styles/types.ts:336
How far right of where labelPosition puts it the label is drawn (a length).
labelOffsetY ​
readonlylabelOffsetY:number
Defined in: styles/types.ts:338
How far down from where labelPosition puts it the label is drawn (a length).
labelOnTop ​
readonlylabelOnTop:boolean
Defined in: styles/types.ts:379
Whether the label is drawn over every node and edge, as sigma.js draws its labels on a layer of their own; unset or false, a nearer node may cover it.
labelOpacity ​
readonlylabelOpacity:number
Defined in: styles/types.ts:349
The opacity of the label's words, 0..1.
labelOutlineColor ​
readonlylabelOutlineColor:`#${string}`
Defined in: styles/types.ts:387
The color of an outline drawn round each letter of the label (vis-network font.strokeColor).
labelOutlineOpacity ​
readonlylabelOutlineOpacity:number
Defined in: styles/types.ts:398
How opaque the outline round the label's letters is, from 0 (none) to 1, over its color. Unset, 1.
labelOutlineWidth ​
readonlylabelOutlineWidth:number
Defined in: styles/types.ts:392
How thick that outline is, a stroke centered on the letters' edges, in the units of labelSize; 0 draws none (vis-network font.strokeWidth).
labelPadding ​
readonlylabelPadding:number
Defined in: styles/types.ts:405
How far the box behind the label's words (its background and border) reaches past the words' line box on every side, in the units of labelSize; 0 puts the border against the words. Unset, the drawing program's default.
labelPaddingX ​
readonlylabelPaddingX:number
Defined in: styles/types.ts:226
The space between the label's box and the node's sides, left and right each, when it grows to fit the label.
labelPaddingY ​
readonlylabelPaddingY:number
Defined in: styles/types.ts:228
The space between the label's box and the node's top and bottom, each, when it grows to fit the label.
labelPosition ​
readonlylabelPosition:StyleLabelPosition
Defined in: styles/types.ts:332
Where the label sits relative to the node.
labelRotation ​
readonlylabelRotation:number
Defined in: styles/types.ts:381
How far the label is turned, in degrees clockwise on screen, 0 up to 360.
labelRunAlign ​
readonlylabelRunAlign:string
Defined in: styles/types.ts:222
Where runs of different sizes in one line of labelRuns meet: baseline (their alphabetic baselines, the default), hanging (their hanging baselines, so their tops line up) or middle (their middles).
labelRuns ​
readonlylabelRuns:string
Defined in: styles/types.ts:322
The label drawn in runs of styles of their own (a program's rich text: vis-network's multi-font labels), as a JSON array of runs left to right, each { "text": string, "weight"?: "bold", "italic"?: true, "font"?: string, "size"?: number, "color"?: "#rrggbb", "shift"?: number }; a run's text may hold line breaks. A run gives only what differs from the label's own font (labelFont, labelSize in the unit of width, labelColor, labelWeight, labelItalic); shift is how far below the label's line the run is drawn, in the unit of its size (negative: above). Its words, run after run, are label. Unset, the label is drawn in its own font throughout.
labelShiftX ​
readonlylabelShiftX:number
Defined in: styles/types.ts:345
How far right the label is drawn again, as a fraction of its own width: -0.5 puts its right edge where its middle was. With labelPosition center and the offsets, it pins any point of the label's box to any point of the node's (Cytoscape desktop's label positions). Measured along the label's own axes, turned by labelRotation, so a turned label turns about the point the shift pins, as Cytoscape and Pajek turn a label about its anchor.
labelShiftY ​
readonlylabelShiftY:number
Defined in: styles/types.ts:347
How far down the label is drawn again, as a fraction of its own height; see labelShiftX.
labelSize ​
readonlylabelSize:number
Defined in: styles/types.ts:193
The label's font size.
labelTextAlign ​
readonlylabelTextAlign:StyleLabelTextAlign
Defined in: styles/types.ts:334
How the label's lines line up with one another: left, center (the default) or right.
labelWeight ​
readonlylabelWeight:StyleLabelWeight
Defined in: styles/types.ts:328
The label's font weight.
labelWrapAnywhere ​
readonlylabelWrapAnywhere:boolean
Defined in: styles/types.ts:211
Whether a line may break between any two letters, filling each line to labelWrapWidth, not only at spaces (Cytoscape.js text-overflow-wrap: anywhere). Unset or false, only at spaces.
labelWrapEllipsis ​
readonlylabelWrapEllipsis:boolean
Defined in: styles/types.ts:206
Whether a line wider than labelWrapWidth is cut to fit with an ellipsis after it, in place of wrapping (Cytoscape.js text-wrap: ellipsis). Unset or false, it wraps.
labelWrapSpaceCount ​
readonlylabelWrapSpaceCount:number
Defined in: styles/types.ts:217
How many blanks one blank between two words counts as when a line is measured against labelWrapWidth; it is still drawn once (vis-network joins a line's words and blanks each with a blank, so it counts three). Unset, one.
labelWrapTrailingSpace ​
readonlylabelWrapTrailingSpace:boolean
Defined in: styles/types.ts:201
Whether a space after each word counts toward labelWrapWidth, the last word's too: a line keeps a word only while the word and a space after it still fit, as Cytoscape desktop measures a line (Cytoscape.js does so for every word but a line's last). Unset or false, only the words count, as a browser wraps text.
labelWrapWidth ​
readonlylabelWrapWidth:number
Defined in: styles/types.ts:195
The width the label's lines wrap at, in the unit of width; unset, a line is as long as its words.
opacity ​
readonlyopacity:number
Defined in: styles/types.ts:181
The opacity of the whole node, 0..1.
outerBorderColor ​
readonlyouterBorderColor:`#${string}`
Defined in: styles/types.ts:276
A second ring's color, drawn outside the border (Cytoscape.js outline-color).
outerBorderOffset ​
readonlyouterBorderOffset:number
Defined in: styles/types.ts:287
How far beyond the border's outer edge that ring starts (a length). Cytoscape.js draws its outline half its outline-offset out, so that is what is read.
outerBorderOpacity ​
readonlyouterBorderOpacity:number
Defined in: styles/types.ts:280
That ring's opacity, 0..1.
outerBorderStyle ​
readonlyouterBorderStyle:StyleBorderStyle
Defined in: styles/types.ts:282
That ring's line style.
outerBorderWidth ​
readonlyouterBorderWidth:number
Defined in: styles/types.ts:278
That ring's width (a length; Cytoscape.js outline-width); 0 or absent draws none.
overlayColor ​
readonlyoverlayColor:`#${string}`
Defined in: styles/types.ts:302
The color of the same filled shape drawn over the node (Cytoscape.js overlay-*).
overlayCornerRadius ​
readonlyoverlayCornerRadius:number
Defined in: styles/types.ts:310
The largest radius of a rounded overlay's corners (a length).
overlayOpacity ​
readonlyoverlayOpacity:number
Defined in: styles/types.ts:304
The opacity of the overlay, 0..1; 0 draws none.
overlayPadding ​
readonlyoverlayPadding:number
Defined in: styles/types.ts:306
How far beyond the node's box the overlay reaches on every side (a length).
overlayShape ​
readonlyoverlayShape:StyleNodeShape
Defined in: styles/types.ts:308
The overlay's shape; absent, the node's own.
pieColors ​
readonlypieColors:string
Defined in: styles/types.ts:463
The colors of a pie chart drawn over the node, one slice each, #rrggbb separated by spaces (Cytoscape.js pie-N-background-color, Graphviz style=wedged).
pieFitBox ​
readonlypieFitBox:boolean
Defined in: styles/types.ts:475
Whether the pie fills the node's box as an ellipse rather than a circle (Graphviz's wedged ellipse).
pieHole ​
readonlypieHole:number
Defined in: styles/types.ts:471
The hole in the pie's middle as a fraction of its radius (a ring chart); unset, 0.
pieOffsetX ​
readonlypieOffsetX:number
Defined in: styles/types.ts:477
How far right of the node's center the pie's center is (a length; Cytoscape's chart positions).
pieOffsetY ​
readonlypieOffsetY:number
Defined in: styles/types.ts:479
How far down from the node's center the pie's center is (a length).
pieOpacities ​
readonlypieOpacities:string
Defined in: styles/types.ts:467
Each slice's opacity, 0..1 separated by spaces; unset, 1.
pieRadius ​
readonlypieRadius:number
Defined in: styles/types.ts:469
The pie's radius as a fraction of half the node's shorter side; unset, 1.
pieRotation ​
readonlypieRotation:number
Defined in: styles/types.ts:473
Where the first slice starts, in degrees clockwise from 12 o'clock; the slices run clockwise.
pieSizes ​
readonlypieSizes:string
Defined in: styles/types.ts:465
Each slice's share of the turn, fractions separated by spaces; a slice with none shares what is left.
shape ​
readonlyshape:StyleNodeShape
Defined in: styles/types.ts:232
The shape.
shapeLines ​
readonlyshapeLines:string
Defined in: styles/types.ts:255
Lines drawn over the node in its border's color, as shapeParts writes polygons: open polylines (one that ends where it starts is closed), shapeLineWidth wide: Graphviz's promoter baseline, a box3d's edges.
shapeLineWidth ​
readonlyshapeLineWidth:number
Defined in: styles/types.ts:257
How wide shapeLines are drawn; unset, the border's width.
shapeParts ​
readonlyshapeParts:string
Defined in: styles/types.ts:250
Further closed pieces of the node's body beside its outline: polygons written as shapePoints is, separated by ";", drawn where they say (never stretched), each filled as the node is and outlined in its border's color and width: Graphviz's assembly is two bars, its noverhang four.
shapePoints ​
readonlyshapePoints:string
Defined in: styles/types.ts:238
A polygon node's corners, each as x,y relative to the node's center as fractions of its half width and half height, y up, separated by spaces: "0,1 1,-1 -1,-1" is a triangle filling the box. A corner past 1 reaches outside the box; a node that grows to hold its label (labelFit) then grows as far as its corners reach.
shapePointsStretch ​
readonlyshapePointsStretch:boolean
Defined in: styles/types.ts:244
Whether a polygon node's corners are stretched about its center until the farthest on each axis reach its sides (true, the default), or drawn exactly where shapePoints puts them (false: OGDF's regular polygons inside the ellipse of the node's box).
shapeTexts ​
readonlyshapeTexts:string
Defined in: styles/types.ts:263
Further texts drawn on the node in its label's font, size and color, each one line centered on its point: a JSON list of [x, y, text], the point as shapeParts writes one (Graphviz's record fields, [[-0.5, 0, "a"], [0.5, 0, "b"]]).
stripeColors ​
readonlystripeColors:string
Defined in: styles/types.ts:484
The colors of bands drawn over the node inside its outline, #rrggbb separated by spaces (Cytoscape.js stripe-N-background-color, Graphviz style=striped).
stripeDirection ​
readonlystripeDirection:string
Defined in: styles/types.ts:490
Which way the bands follow one another: down (unset, top to bottom) or right (left to right).
stripeOpacities ​
readonlystripeOpacities:string
Defined in: styles/types.ts:488
Each band's opacity, 0..1 separated by spaces; unset, 1.
stripeSize ​
readonlystripeSize:number
Defined in: styles/types.ts:492
The size of the box the bands fill, as a fraction of the node's; unset, 1.
stripeSizes ​
readonlystripeSizes:string
Defined in: styles/types.ts:486
Each band's share of the node, fractions separated by spaces; a band with none shares what is left.
tooltip ​
readonlytooltip:string
Defined in: styles/types.ts:324
The tooltip text.
underlayColor ​
readonlyunderlayColor:`#${string}`
Defined in: styles/types.ts:292
The color of a filled shape drawn beneath the node, underlayPadding beyond its box on every side (Cytoscape.js underlay-*); drawn only with an underlayOpacity above 0.
underlayCornerRadius ​
readonlyunderlayCornerRadius:number
Defined in: styles/types.ts:300
The largest radius of a rounded underlay's corners (a length).
underlayOpacity ​
readonlyunderlayOpacity:number
Defined in: styles/types.ts:294
The opacity of the underlay, 0..1; 0 draws none.
underlayPadding ​
readonlyunderlayPadding:number
Defined in: styles/types.ts:296
How far beyond the node's box the underlay reaches on every side (a length).
underlayShape ​
readonlyunderlayShape:StyleNodeShape
Defined in: styles/types.ts:298
The underlay's shape; absent, the node's own.
visible ​
readonlyvisible:boolean
Defined in: styles/types.ts:522
Whether the node is drawn at all.
width ​
readonlywidth:number
Defined in: styles/types.ts:185
The width.