Skip to content

@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 ​

readonly borderColor: `#${string}`

Defined in: styles/types.ts:175

The border (outline) color.


borderOpacity ​

readonly borderOpacity: number

Defined in: styles/types.ts:183

The opacity of the border alone, 0..1 (0 draws no border).


borderPosition ​

readonly borderPosition: StyleBorderPosition

Defined in: styles/types.ts:267

Where the border sits against the node's width and height.


borderStyle ​

readonly borderStyle: StyleBorderStyle

Defined in: styles/types.ts:265

The border's line style.


borderWaveAmplitude ​

readonly borderWaveAmplitude: 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 ​

readonly borderWavePeriod: 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 ​

readonly borderWidth: number

Defined in: styles/types.ts:189

The border width (0 is no border).


chartBorderColor ​

readonly chartBorderColor: `#${string}`

Defined in: styles/types.ts:518

The color of a bar's and a box's outline.


chartBorderWidth ​

readonly chartBorderWidth: number

Defined in: styles/types.ts:520

How wide a bar's and a box's outline is (a length); unset, none.


chartColors ​

readonly chartColors: 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 ​

readonly chartGap: 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 ​

readonly chartHorizontal: 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 ​

readonly chartKind: 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 ​

readonly chartLineWidth: number

Defined in: styles/types.ts:516

How wide the chart draws a line and a whisker (a length).


chartMargin ​

readonly chartMargin: 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 ​

readonly chartMax: number

Defined in: styles/types.ts:506

The value at the end of the chart's value axis; unset, the greatest value.


chartMin ​

readonly chartMin: 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 ​

readonly chartSize: 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 ​

readonly chartValues: string

Defined in: styles/types.ts:500

The chart's values, numbers separated by spaces, in the order they are drawn.


cornerRadius ​

readonly cornerRadius: number

Defined in: styles/types.ts:191

A rounded rectangle's corner radius, in the units of width and height.


fill ​

readonly fill: `#${string}`

Defined in: styles/types.ts:150

The fill color.


fillGradient ​

readonly fillGradient: `#${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 ​

readonly fillGradientAngle: 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 ​

readonly fillGradientColors: 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 ​

readonly fillGradientKind: string

Defined in: styles/types.ts:173

How a gradient fill runs: linear across the node (fillGradientAngle), or radial out from its middle.


fillGradientStops ​

readonly fillGradientStops: 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 ​

readonly fillOpacity: number

Defined in: styles/types.ts:179

The opacity of the fill alone, 0..1 (0 is an unfilled node).


glyph ​

readonly glyph: 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 ​

readonly glyphColor: string

Defined in: styles/types.ts:458

The glyph's color.


glyphFont ​

readonly glyphFont: string

Defined in: styles/types.ts:452

The glyph's CSS font family.


glyphSize ​

readonly glyphSize: number

Defined in: styles/types.ts:454

The glyph's font size, in the units of width.


glyphWeight ​

readonly glyphWeight: StyleLabelWeight

Defined in: styles/types.ts:456

The glyph's weight.


height ​

readonly height: number

Defined in: styles/types.ts:187

The height.


image ​

readonly image: string

Defined in: styles/types.ts:411

The URI of an image drawn on the node.


imageAutoSize ​

readonly imageAutoSize: 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 ​

readonly imageClip: string

Defined in: styles/types.ts:435

node (unset) keeps the image inside the node's outline; none lets it reach past.


imageFallback ​

readonly imageFallback: string

Defined in: styles/types.ts:419

The image drawn instead when image cannot be loaded (vis-network's brokenImage).


imageFit ​

readonly imageFit: 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 ​

readonly imageHeight: number

Defined in: styles/types.ts:423

The image's height where imageFit is none (a length).


imageOffsetX ​

readonly imageOffsetX: number

Defined in: styles/types.ts:429

How far right the image is moved from there (a length).


imageOffsetY ​

readonly imageOffsetY: number

Defined in: styles/types.ts:431

How far down the image is moved from there (a length).


imageOpacity ​

readonly imageOpacity: number

Defined in: styles/types.ts:444

The image's opacity, 0..1.


imagePositionX ​

readonly imagePositionX: 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 ​

readonly imagePositionY: 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 ​

readonly imageRepeat: string

Defined in: styles/types.ts:433

Whether the image is tiled: no-repeat (unset), repeat, repeat-x or repeat-y.


imageSmoothing ​

readonly imageSmoothing: 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 ​

readonly imageWidth: number

Defined in: styles/types.ts:421

The image's width where imageFit is none (a length); with only imageHeight, its proportions decide.


label ​

readonly label: string

Defined in: styles/types.ts:312

The label text, as the tool draws it.


labelAvoidOverlap ​

readonly labelAvoidOverlap: 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 ​

readonly labelBackground: `#${string}`

Defined in: styles/types.ts:383

The color of a box drawn behind the label's text (vis-network font.background).


labelBackgroundOpacity ​

readonly labelBackgroundOpacity: number

Defined in: styles/types.ts:385

The opacity of that box, 0..1.


labelBorderColor ​

readonly labelBorderColor: `#${string}`

Defined in: styles/types.ts:394

The color of a line drawn round the box behind the label's words (yEd lineColor).


labelBorderOpacity ​

readonly labelBorderOpacity: 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 ​

readonly labelBorderWidth: number

Defined in: styles/types.ts:396

How thick that line is, in the units of labelSize; 0 draws none.


labelColor ​

readonly labelColor: `#${string}`

Defined in: styles/types.ts:177

The label's text color.


labelCornerRadius ​

readonly labelCornerRadius: 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 ​

readonly labelFit: 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 ​

readonly labelFitSquare: 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 ​

readonly labelFont: string

Defined in: styles/types.ts:326

The label's font family, as the file names it.


labelGridCellSize ​

readonly labelGridCellSize: 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 ​

readonly labelItalic: boolean

Defined in: styles/types.ts:330

Whether the label is italic.


labelLineHeight ​

readonly labelLineHeight: 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 ​

readonly labelMinNodeScreenSize: 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 ​

readonly labelMinScreenSize: 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 ​

readonly labelOffsetX: number

Defined in: styles/types.ts:336

How far right of where labelPosition puts it the label is drawn (a length).


labelOffsetY ​

readonly labelOffsetY: number

Defined in: styles/types.ts:338

How far down from where labelPosition puts it the label is drawn (a length).


labelOnTop ​

readonly labelOnTop: 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 ​

readonly labelOpacity: number

Defined in: styles/types.ts:349

The opacity of the label's words, 0..1.


labelOutlineColor ​

readonly labelOutlineColor: `#${string}`

Defined in: styles/types.ts:387

The color of an outline drawn round each letter of the label (vis-network font.strokeColor).


labelOutlineOpacity ​

readonly labelOutlineOpacity: 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 ​

readonly labelOutlineWidth: 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 ​

readonly labelPadding: 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 ​

readonly labelPaddingX: 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 ​

readonly labelPaddingY: 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 ​

readonly labelPosition: StyleLabelPosition

Defined in: styles/types.ts:332

Where the label sits relative to the node.


labelRotation ​

readonly labelRotation: number

Defined in: styles/types.ts:381

How far the label is turned, in degrees clockwise on screen, 0 up to 360.


labelRunAlign ​

readonly labelRunAlign: 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 ​

readonly labelRuns: 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 ​

readonly labelShiftX: 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 ​

readonly labelShiftY: 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 ​

readonly labelSize: number

Defined in: styles/types.ts:193

The label's font size.


labelTextAlign ​

readonly labelTextAlign: StyleLabelTextAlign

Defined in: styles/types.ts:334

How the label's lines line up with one another: left, center (the default) or right.


labelWeight ​

readonly labelWeight: StyleLabelWeight

Defined in: styles/types.ts:328

The label's font weight.


labelWrapAnywhere ​

readonly labelWrapAnywhere: 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 ​

readonly labelWrapEllipsis: 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 ​

readonly labelWrapSpaceCount: 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 ​

readonly labelWrapTrailingSpace: 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 ​

readonly labelWrapWidth: 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 ​

readonly opacity: number

Defined in: styles/types.ts:181

The opacity of the whole node, 0..1.


outerBorderColor ​

readonly outerBorderColor: `#${string}`

Defined in: styles/types.ts:276

A second ring's color, drawn outside the border (Cytoscape.js outline-color).


outerBorderOffset ​

readonly outerBorderOffset: 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 ​

readonly outerBorderOpacity: number

Defined in: styles/types.ts:280

That ring's opacity, 0..1.


outerBorderStyle ​

readonly outerBorderStyle: StyleBorderStyle

Defined in: styles/types.ts:282

That ring's line style.


outerBorderWidth ​

readonly outerBorderWidth: number

Defined in: styles/types.ts:278

That ring's width (a length; Cytoscape.js outline-width); 0 or absent draws none.


overlayColor ​

readonly overlayColor: `#${string}`

Defined in: styles/types.ts:302

The color of the same filled shape drawn over the node (Cytoscape.js overlay-*).


overlayCornerRadius ​

readonly overlayCornerRadius: number

Defined in: styles/types.ts:310

The largest radius of a rounded overlay's corners (a length).


overlayOpacity ​

readonly overlayOpacity: number

Defined in: styles/types.ts:304

The opacity of the overlay, 0..1; 0 draws none.


overlayPadding ​

readonly overlayPadding: number

Defined in: styles/types.ts:306

How far beyond the node's box the overlay reaches on every side (a length).


overlayShape ​

readonly overlayShape: StyleNodeShape

Defined in: styles/types.ts:308

The overlay's shape; absent, the node's own.


pieColors ​

readonly pieColors: 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 ​

readonly pieFitBox: 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 ​

readonly pieHole: 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 ​

readonly pieOffsetX: 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 ​

readonly pieOffsetY: number

Defined in: styles/types.ts:479

How far down from the node's center the pie's center is (a length).


pieOpacities ​

readonly pieOpacities: string

Defined in: styles/types.ts:467

Each slice's opacity, 0..1 separated by spaces; unset, 1.


pieRadius ​

readonly pieRadius: number

Defined in: styles/types.ts:469

The pie's radius as a fraction of half the node's shorter side; unset, 1.


pieRotation ​

readonly pieRotation: number

Defined in: styles/types.ts:473

Where the first slice starts, in degrees clockwise from 12 o'clock; the slices run clockwise.


pieSizes ​

readonly pieSizes: 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 ​

readonly shape: StyleNodeShape

Defined in: styles/types.ts:232

The shape.


shapeLines ​

readonly shapeLines: 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 ​

readonly shapeLineWidth: number

Defined in: styles/types.ts:257

How wide shapeLines are drawn; unset, the border's width.


shapeParts ​

readonly shapeParts: 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 ​

readonly shapePoints: 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 ​

readonly shapePointsStretch: 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 ​

readonly shapeTexts: 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 ​

readonly stripeColors: 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 ​

readonly stripeDirection: 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 ​

readonly stripeOpacities: string

Defined in: styles/types.ts:488

Each band's opacity, 0..1 separated by spaces; unset, 1.


stripeSize ​

readonly stripeSize: 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 ​

readonly stripeSizes: 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 ​

readonly tooltip: string

Defined in: styles/types.ts:324

The tooltip text.


underlayColor ​

readonly underlayColor: `#${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 ​

readonly underlayCornerRadius: number

Defined in: styles/types.ts:300

The largest radius of a rounded underlay's corners (a length).


underlayOpacity ​

readonly underlayOpacity: number

Defined in: styles/types.ts:294

The opacity of the underlay, 0..1; 0 draws none.


underlayPadding ​

readonly underlayPadding: number

Defined in: styles/types.ts:296

How far beyond the node's box the underlay reaches on every side (a length).


underlayShape ​

readonly underlayShape: StyleNodeShape

Defined in: styles/types.ts:298

The underlay's shape; absent, the node's own.


visible ​

readonly visible: boolean

Defined in: styles/types.ts:522

Whether the node is drawn at all.


width ​

readonly width: number

Defined in: styles/types.ts:185

The width.