Skip to main content

Crate chartlet

Crate chartlet 

Source

Modules§

qr
QR codes: encode text into a module matrix and draw it as SVG.

Structs§

ArchitectureSpec
An architecture diagram: components joined by connections, inside nested boundaries such as a cloud region, a network or a system, laid out like a flow chart.
AreaSpec
BoundarySpec
A frame around components, such as a cloud region, a network, a zone or a system. Boundaries nest by naming the boundary they lie in.
BoxSpec
One box of a boxplot chart: a category with either its observations, from which chartlet computes the box, or the five numbers of a box that was computed elsewhere.
BranchSpec
A further branch of an alt fragment, from the message from to the next branch or the end of the frame.
BuiltinMetrics
CalendarDay
One day of a calendar heatmap.
CalendarSpec
A calendar heatmap of one year.
CategoryAxisSpec
CategorySpec
A category of a perspective, such as a team, and the ids of the components and of the connections in it.
ChartError
ChartSpec
ChartWarning
ClassSpec
ClassesSpec
A class diagram or entity-relationship diagram: boxes with an attribute and a method compartment, joined by relations with their cardinalities, laid out like a flow chart.
ComponentSpec
ConnectionSpec
CycleHubSpec
CycleSpec
A cycle: steps on a ring where the last step feeds the first, optionally with a hub in the middle that the steps feed.
CycleStepSpec
DataPoint
DataTable
A chart’s data table as text, values written as the chart writes them.
DeltaSpec
Two states of an architecture model to compare: the keys of the views that show the state before and the state after.
DistancesSpec
Items and the distance between every two of them, as a square matrix in the order of the labels: symmetric, 0 on the diagonal, nowhere below 0.
EmphasisSpec
What the reader should look at first in a diagram: up to two nodes, which get the accent outline and tint, and a path, whose edges get the accent line. Everything else stays neutral.
FishboneBoneSpec
A category of causes: a bone with its causes.
FishboneCauseSpec
A cause on a bone, with the sub-causes that lead to it.
FishboneSpec
A fishbone (cause and effect) diagram: one effect at the head and, on bones that alternate above and below the spine, the categories of its causes.
FishboneSubcauseSpec
A sub-cause: the second and last level.
FlowEdgeSpec
FlowNodeSpec
FlowSpec
A flow chart: steps joined by arrows, laid out in layers along the direction of the flow, optionally in lanes and framed in groups.
FontMetrics
Text measured with the advance widths of a TrueType or OpenType font that the caller supplied. Kerning and shaping are not applied, and only the basic multilingual plane is mapped: scripts that need shaping (Arabic, Indic scripts) are outside what chartlet lays out.
FragmentSpec
A frame around the messages from to to, both counted from 0 and included.
FunnelSpec
A funnel: stages from the first to the last, each narrower than the one before as the value falls; or a pyramid of ranked levels, the first at the top.
FunnelStageSpec
GroupSpec
HeatmapCellSpec
One cell: its row and column by label, and its value or its category.
HeatmapSpec
A heatmap: values, or categories, in a grid of rows and columns. A cell that is not listed has no value and is drawn as such.
Help
Help for one warning.
Inspection
One finding: a stable code, its weight, the JSON Pointer of the part of the model it is about, what was found and how to improve it.
InstanceSpec
One running instance of a component in a deployment view.
InterfaceSpec
An interface a component provides, such as an API: an id unique within the component and the label written beside its ball.
ItemSpec
A piece of furniture in an area, standing at x, y in grid units from the area’s corner.
JourneySpec
A user journey: stages as columns with what the customer does, where, thinks and feels in each; as a service blueprint it adds what the service does in front of and behind the customer.
JourneyStageSpec
One stage of the journey. Every row is optional; a row that no stage fills is left out.
KanbanCardSpec
A card: its title and, if known, who owns it and what kind of work it is.
KanbanColumnSpec
A column of the board with an optional limit on the work in progress.
KanbanSpec
A kanban board: columns, each a state, with cards.
LaneSpec
LayerSpec
One layer of a pane. Which fields apply depends on mark; anything that belongs to a different mark is rejected with a path, never ignored.
LayersSpec
Layers: stacked abstraction levels, or scopes drawn inside each other.
Manifest
The provenance of one render: which version of chartlet produced which output from which specification, with which options and warnings. It carries no timestamp, so the same render always yields the same manifest.
MarkerSpec
MessageSpec
MobileSpec
The size of the mobile variant, and the container width below which the HTML profile shows it instead of the chart at width × height.
MosaicColumnSpec
MosaicSegmentSpec
One segment of a column. Segments of the same label in several columns share a color.
MosaicSpec
A mosaic chart (also called a Marimekko chart): columns whose width is their share of the whole and whose segments split each column by share, such as the market shares of several regions split by product.
NetworkEdgeSpec
NetworkNodeSpec
NetworkSpec
A network: nodes joined by edges, with no direction of flow, on a circle or in rings around one node.
NoteSpec
A note on a flow chart, class or architecture diagram, such as an assumption or a limitation. On an element it is a box beside the element, joined to it by a dotted line that only says the note explains it; the line is no edge, relation or connection of the model. On a frame (a package or a boundary) it stands inside the frame without a line, and without on it explains the diagram as a whole and stands in a band below it.
OhlcPoint
One candlestick of an ohlc layer.
PackageSpec
A frame around classes that belong together. Packages nest by naming the package they lie in; relations still join classes, never packages.
PaneSpec
One pane of a time chart: a value axis over the shared time axis, with its own layers.
ParliamentSpec
A parliament: the seats of an assembly as dots in a semicircle, in blocks by party from left to right in the order of the list.
PartSpec
One part of what a node holds: a name and a value of at least 0.
ParticipantSpec
PartySpec
PatchOperation
One operation of a proposed change: op is add or replace, path a JSON Pointer.
PerspectiveSpec
A question the model can be seen under, such as who runs a component or how much technical debt it carries, with the categories that answer it and the components in each. Only what the categories list is shown; nothing is derived.
PlanSpec
A plan: rooms, buildings and open ground on a grid, seen at an angle in 2:1 dimetric projection with the walls cut low, so that every room shows.
PolarPointSpec
PolarSpec
A polar chart: one value for every category of a cycle (months, hours, directions), drawn at an angle by the category and a distance from the center by the value, which is zero at the center.
RadarAxisSpec
One axis: its label and, optionally, the values at its center and at its end.
RadarSeriesSpec
RadarSpec
A radar chart: one axis per measure, drawn from the center like the spokes of a wheel, and one closed polygon per series through its values.
RangeSpec
One span of a rangebar chart: a category with a low and a high value and, optionally, a central estimate.
ReferenceSpec
A reference line across a bar chart: a value every bar is read against.
RelationSpec
Remedy
A candidate correction.
RenderOptions
RenderOutput
SankeyLinkSpec
SankeyNodeSpec
SankeySpec
A Sankey diagram: nodes in columns, joined by bands as thick as the flow between them. The nodes are the labels the links name, in the order they first appear.
ScatterLineSpec
ScatterPointSpec
ScatterQuadrantLabels
The names of the four areas of a scatter plot; top is the side of the larger y, right the side of the larger x.
ScatterQuadrantsSpec
Four areas of a scatter plot, divided by a line at x and one at y.
ScatterSpec
A scatter plot: points on two numeric axes, in up to four groups, with threshold lines and names on the points that matter: a volcano plot, a Manhattan plot, a regression residual.
ScatterTickSpec
SequenceSpec
A sequence diagram: participants side by side and the messages they exchange, in order.
SeriesSpec
One named series with one value per category; None marks a missing value.
StackLayerSpec
StateNodeSpec
StateSpec
A state diagram: states joined by transitions, laid out like a flow chart.
StepSpec
StorymapActivitySpec
An activity of the backbone, with the tasks a user does to carry it out.
StorymapSpec
A user story map: a backbone of activities, the user tasks under each, and the stories of every task in slices by release.
StorymapStorySpec
A story and the release it belongs to.
StorymapTaskSpec
A user task and the stories that make it possible.
StripesSpec
Warming stripes: one colored stripe per year.
SurvivalGroupSpec
SurvivalObservationSpec
SurvivalSpec
Kaplan-Meier curves: the share of each group still without the event as time passes, from observed times of which some ended in the event and some were cut off (censored).
TextAlternative
What a chart says without its graphic: the description its SVG carries and the data table of its HTML profile, as text, for hosts that build their own accessible wrapper around the SVG.
TimeAxisSpec
TimePoint
One observation of a line or area layer.
TimelineItemSpec
TimelineSpec
A timeline: phases that run from a start to an end, milestones on a day, lines for days that matter, and which item follows which. Gantt charts, roadmaps, the course of a procedure.
TransitionSpec
A transition from one state to another, or to itself, written event [guard] / action.
TreeNodeSpec
TreeSpec
A tree: one root and, below it, nodes that each name their parent; the children of a node keep the order of the list. Organization charts, ownership structures, hierarchies of norms or components.
TreemapItemSpec
TreemapSpec
A treemap: rectangles whose areas follow the values of the items, packed into one rectangle.
TypographySpec
The fonts of a chart: titles and labels in family, technical sublabels in technical_family, and the width the layout reserves for text.
ValueAxisSpec
ValuemapComponentSpec
A component and its place on the map.
ValuemapDependencySpec
ValuemapMoveSpec
The place a component is moving to; the visibility stays unless it is given.
ValuemapSpec
A value chain map: components placed by how visible they are to the user (up) and how far they have evolved (right), with the dependencies between them and where each is moving.
VennRegionSpec
A region of the diagram: the part that lies in exactly the sets it names.
VennSpec
A Venn diagram of two or three sets, with a label and a count for any of its regions.
ViewSpec
A view on an architecture model: a key that names it, its own title and description, and the components it shows. Connections between them come along unless the view lists its own; a dynamic view instead lists steps, occurrences of existing connections in order.
ViewStepSpec
One occurrence of a connection in a dynamic view.
WafflePartSpec
WaffleSpec
A waffle: a grid of squares, each of which stands for the same share of a whole. The parts fill the squares one after the other, reading order, so that shares can be counted.
WaterfallSpec
A waterfall: a running total that moves up and down step by step, from a start to a total.
ZoomStep
A pre-computed zoom step: shows categories from..=to, or on a time chart the observations from from to to, as its own chart variant.

Enums§

AreaKind
What an area is.
AxisScale
How a value axis spaces its values.
BoxDisplay
How the observations of a boxplot chart are drawn.
CalendarLayout
How a calendar arranges the days of its year.
ChartType
ClassKind
What a class is: it decides the stereotype written above its name.
ComponentKind
What a component is; every kind has its own shape.
ConnectionDirection
Which way a connection runs. A connection both ways stays one connection: one relationship that is used in either direction, such as a socket or a synchronisation.
Curve
How a line or an area runs from one observation to the next.
CycleLabels
Where the steps of a cycle carry their labels.
Dash
The pattern of a line.
DiagramOrientation
Which way a diagram runs on its canvas.
DiagramRole
What a node or an edge of a diagram means beyond its kind, the same in every diagram: each role has its own color and a sign that does not depend on color, a pattern or a badge, and the legend below the diagram names the roles it uses.
DiagramSpacing
How much room a layered diagram leaves between its layers and between neighbours in a layer. Only the gaps scale: steps, texts, margins and the distance between two parallel lines keep their size, and a compact gap stays at least 16 pixels between steps, 20 between layers.
FragmentKind
What a fragment frames.
FunnelDisplay
Gaps
Whether the time axis leaves a gap where an observation is missing, or collapses it.
HeatmapOrder
HeatmapScale
ItemKind
JourneyDisplay
LayersDisplay
How the layers relate to each other.
LayersProjection
How a stack is drawn.
LegendPlacement
Where a time chart names its series.
Linkage
How far apart two clusters are.
Look
How diagrams are drawn, apart from their palette: the classic look gives every kind of node a color of its own; the editorial look is neutral paper and ink with one accent.
MainPath
The main path of a diagram: the ids of its steps in order, each joined to the next by an edge, or the two ends of the way, which the shortest way along the edges joins.
Mark
How a layer draws its data.
MessageKind
How a message is sent. Each kind has its own line and arrowhead.
NetworkLayout
How the nodes of a network are placed.
NetworkOrder
The order of the nodes around a circle, clockwise from twelve o’clock.
NodeKind
What a step is; every kind has its own shape.
Orientation
ParticipantKind
What a participant is; each kind has its own shape, so that it does not rest on color.
PolarDisplay
PortSide
A side of a node, named after the direction of the flow so that it holds in either orientation: start faces the steps before, end the steps after, and left and right are the sides across the flow, left and right in portrait, top and bottom in landscape.
RangeDisplay
How the spans of a rangebar chart are drawn.
RangeSort
The order of the spans of a rangebar chart.
RelationKind
How two classes are related; each kind has its own marks at the line’s ends.
RemedyKind
What kind of change a remedy is.
RenderFormat
SankeyOrder
ScatterAxis
Severity
How much a finding weighs: a Gap is missing documentation the specification has a field for; a Hint is something to look at, which may well be intended.
Shape
A marker shape for annotating a single point.
SizePreset
A named canvas size for a destination: documents, slides, print or social previews.
Stack
How the series of a bar chart share a category: stacked by value, or as shares of the category’s total.
StateKind
What a state is.
StepKind
What a step does to the running total.
Stroke
The weight of a line.
StrokeStyle
How the lines and shapes of a chart are drawn.
Styles
Where a chart’s styles live.
TableMode
Theme
The palette a chart is rendered in. Both palettes are expressed as CSS custom properties, so a host page can override any single color.
TimeAxisKind
What the positions of a time axis are: calendar timestamps, or plain numbers such as a distance, a depth or an age in millions of years.
TimePrecision
The precision a time axis names its observations in.
Tooltips
Which observations of a type: "time" chart carry a tooltip.
TreeLayout
How a tree is laid out.
TreeNodeKind
What a node is.
ValueFormat
Variant
Which layout the SVG profile renders. The HTML profile always carries the chart and, when the specification has one, its mobile variant.
ViolinScale
How the widths of violins relate to each other.
ZoomBound
One end of a zoom step: a category index on a bar or line chart, a timestamp on a time chart. A whole number from 0 up reads as an index first, so that a category chart keeps its serialized form; on a time chart the same number is Unix seconds.

Constants§

INSPECTIONS
The codes of every inspection, in the order findings are reported: those of architecture models, of flow charts, then of class diagrams.

Traits§

TextMetrics

Functions§

advise
Help for the warnings of rendering spec (the JSON text) with options. Only warnings that have help are answered; a warning whose correction the compiler cannot verify gets honest guidance without a patch. Returns nothing for a specification that does not render.
advise_json
Advice for the warnings of a render, for callers that hold only the specification text: renders it, and answers the help for the warnings it gives.
apply_theme
Applies a theme file to a specification, both as JSON text, and returns the specification. A theme file holds a theme, a look and tokens: the theme and the look are used where the specification names none, and a token of the specification replaces the token of the file with the same name.
bundled_theme
The text of the bundled theme file called name: light, dark or blueprint, which are palettes, or classic or editorial, which are looks of diagrams.
embed_font
The SVG with the font carried as a base64 @font-face for family, placed behind the opening tag of the root. The font is embedded as given; whether its license allows that is the caller’s to check.
inspect_json
Inspects the architecture model, flow chart or class diagram input, leaving out the inspections whose codes are in disabled. Findings follow the order of INSPECTIONS, and within one inspection the order of the specification.
render
Validates and renders an already parsed chart specification.
render_json
Parses and renders a chart specification.
render_with_font
Renders with the advance widths of font, a TrueType or OpenType file the caller supplies: the layout measures with it instead of the built-in metrics, and font_glyphs_missing names the characters it has no glyph for. The output still only names the family; see embed_font to carry the file in an SVG. Nothing is fetched or looked up on the machine.
render_with_metrics
Renders with caller-provided deterministic text metrics.
sha256
The SHA-256 digest of message, as FIPS 180-4 defines it. The working variables keep the standard’s one-letter names so the round function can be read against the specification.
stylesheet
The stylesheet every chart rendered with Styles::External relies on. It is the same for every chart, so a site serves it once as a cacheable file.
stylesheet_common
The part of the shared stylesheet that every chart relies on, whatever its type: colors, text, grid and axes. A page that loads type parts separately loads this part first.
stylesheet_for
The shared stylesheet with only the rules of chart_types: enough for a site that renders no other types. It is stylesheet_common followed by stylesheet_types, and the part of each type comes in the order of chart_types.
stylesheet_types
The parts of the shared stylesheet that only charts of chart_types use, without the common part. Each type’s rules style only charts of that type, so the parts of separate calls can be loaded as separate files, in any order, after stylesheet_common.
text_alternative
Validates a chart specification and returns its text alternative; that of the default view for an architecture model with views (see ChartSpec::view for another view).