Interface: ModelGraphOptions
Defined in: ml/model-chart.ts:61
Extends
Properties
arrowSize?
optional arrowSize?: number;Defined in: ml/model-chart.ts:71
Arrowhead length in data units; 0 hides them. Default 0.18.
colors?
optional colors?: Partial<Record<LayerCategory, string>>;Defined in: ml/model-chart.ts:64
Per-category color overrides (merged over LAYER_COLORS).
cornerRadius?
optional cornerRadius?: number;Defined in: ml/model-chart.ts:66
Box corner radius in data units. Default 0.14.
direction?
optional direction?: "vertical" | "horizontal";Defined in: ml/model.ts:525
Flow direction: "vertical" top→bottom (default) or "horizontal" left→right.
Inherited from
edgeColor?
optional edgeColor?: string;Defined in: ml/model-chart.ts:69
edgeWidth?
optional edgeWidth?: number;Defined in: ml/model-chart.ts:68
Connector thickness in data units. Default 0.05.
equalAspect?
optional equalAspect?: boolean;Defined in: ml/model-chart.ts:108
Lock data-units-per-pixel on both axes. Default true, and you almost never want it off: box proportions, corner radii and arrowheads are all in data units, so a free aspect stretches every one of them when the container changes shape (resizing, or going fullscreen).
graph
graph: ModelGraph;Defined in: ml/model-chart.ts:62
hideAxes?
optional hideAxes?: boolean;Defined in: ml/model-chart.ts:101
Blank the axes — a diagram has no meaningful coordinates. Default true.
labelColor?
optional labelColor?: string;Defined in: ml/model-chart.ts:92
labelFont?
optional labelFont?: string;Defined in: ml/model-chart.ts:93
labelLineHeight?
optional labelLineHeight?: number;Defined in: ml/model-chart.ts:110
Vertical gap between label lines, in CSS px. Default 15.
labels?
optional labels?: "none" | "name" | "full";Defined in: ml/model-chart.ts:91
What to write inside each box. Default "full".
maxSlices?
optional maxSlices?: number;Defined in: ml/model-chart.ts:84
Cap on cards per layer. Default 12.
name?
optional name?: string;Defined in: ml/model-chart.ts:112
Legend name for the box layer. Omitted by default (diagrams use their own key).
nodeGap?
optional nodeGap?: number;Defined in: ml/model.ts:533
Gap between siblings inside a rank. Default 0.6.
Inherited from
nodeHeight?
optional nodeHeight?: number;Defined in: ml/model.ts:529
Box height in data units. Default 0.9.
Inherited from
nodeWidth?
optional nodeWidth?: number;Defined in: ml/model.ts:527
Box width in data units. Default 2.6.
Inherited from
opacity?
optional opacity?: number;Defined in: ml/model-chart.ts:73
Box fill opacity, 0..1. Default 0.9.
rankGap?
optional rankGap?: number;Defined in: ml/model.ts:531
Gap between consecutive ranks. Default 0.7.
Inherited from
sizeBy?
optional sizeBy?: "none" | "params" | "flops";Defined in: ml/model.ts:538
Scale the box across the flow (width when vertical, height when horizontal) by a metric, so heavy layers read as bigger. Default "none".
Inherited from
sizeRange?
optional sizeRange?: Range;Defined in: ml/model.ts:540
Multiplier range applied when sizeBy is set. Default [0.55, 1.5].
Inherited from
slices?
optional slices?: number | "none" | "channels";Defined in: ml/model-chart.ts:82
Draw each box as a stack of offset cards instead of one rectangle, so a [3, 224, 224] layer reads as three feature maps rather than one block.
"channels" uses the layer's own channel count, a number uses that many for every layer, "none" (default) keeps one box. The front card stays where the box was, and keeps the labels, so nothing shifts or becomes unreadable.
sliceSpread?
optional sliceSpread?: number;Defined in: ml/model-chart.ts:89
How far the stack fans out, as a fraction of the box size. The spread is fixed regardless of the card count. Default 0.3.
subLabelColor?
optional subLabelColor?: string;Defined in: ml/model-chart.ts:94
subLabelFont?
optional subLabelFont?: string;Defined in: ml/model-chart.ts:95
sweeps?
optional sweeps?: number;Defined in: ml/model.ts:542
Barycenter passes used to reduce edge crossings. Default 4.
Inherited from
theme?
optional theme?: "light" | "dark";Defined in: ml/model-chart.ts:99
Palette for the tooltip chrome. Default "dark".
tooltip?
optional tooltip?: boolean;Defined in: ml/model-chart.ts:97
Attach a hover tooltip with the layer's shape + parameter count. Default true.