Hylograph.Flow.Render.Signal
- Package
- purescript-hylograph-flow-render
- Repository
- afcondon/purescript-hylograph-flow-render
Signals of identity that do not depend on place (0.6).
When a change of cut moves things (Continuity says the pair is only
Ordered, or less), another channel has to carry the identity that
position lost. Two are offered to a page as decorations:
- hue: a group has a hue, its closed bar is drawn in it, and so are
its parts when it is open (
hued). A group inside a hued group that has no hue of its own takes the hue of the group over it. - the outline bearing the closed name: the layout engines draw it
already (
PlacedOutline.name), for every open group.
The page decides when to use them; Continuity.continuity is what it
decides by.
#groupsOver Source
groupsOver :: Array Grouping -> ElementKey -> Array GroupIdEvery group over each element a grouping names, outermost first, whichever are open; a closed group's step and summary are under the groups over it and under itself.
#hued Source
hued :: forall wire. Array Grouping -> (GroupId -> Maybe String) -> Decoration wire -> Decoration wireA decoration with every node in a hued group drawn in its group's hue, closed or open, and every edge that leaves such a node likewise (an edge that leaves a node of no hue takes the hue of the node it enters).
#palette Source
palette :: Array StringThe hues of colour by default (0.7): five, in a fixed order.
In a flow drawing any two ribbons may cross, so every pair of hues
has to be told apart, not only neighbours. These five are the largest
set found, among the eight hues of a general-purpose categorical
palette and Okabe and Ito's eight, that passes a palette validator on
all pairs, against a white surface: every pair at least 8 apart in
OKLab (times 100) under simulated protanopia and deuteranopia (the
worst is 9.1, yellow and aqua, protan), at least 15 apart in full
colour (the worst 15.6, green and aqua), all in one band of lightness.
Under simulated tritanopia the worst pair is 6.7 apart. No sixth hue of
those tried could be added: so a picture with more than five things to
tell apart reuses a hue, and Measures.overlapsInOneColour says where
that matters. (Okabe and Ito's set whole fails the same check on its
yellow's lightness; with its yellow left out its worst pair passes, but
no more than five of it and the other set together pass all pairs.)
Blue, aqua, yellow, green, sky.
#coloured Source
coloured :: forall wire. Array Grouping -> Projection wire -> Decoration wire -> Decoration wireColour by default (0.7): a decoration with every node that gives anything, and every ribbon, in a hue.
The flow's top-level blocks that give something (a top-level group, or
a node no group holds; one that only receives stays in the ink) take
the palette's hues in the order they are given, round and round. A
group's parts keep the group's hue in shades, from darker to lighter
in the order given, so that two parts of one group can be told apart
and are still seen to be of one group; a closed group's bar is the
group's hue itself. A ribbon takes the colour of where it comes from,
in one of three tints by where it goes (see tinted below).
So a ribbon keeps its hue whatever is open, and an overlap is grey on
grey only where two blocks share a hue (more than five give) or two
ribbons leave one node.
finest: the flow's projection with nothing closed, in the order the
hues are to be given (the unfolding engine's one order, say: its nodes
sorted by Unfold.rankOf). Text is not coloured: the tree writes
every label in the ink.
- Modules
- Hylograph.
Flow. Render. Columns - Hylograph.
Flow. Render. Continuity - Hylograph.
Flow. Render. Engine - Hylograph.
Flow. Render. Internal. Bands - Hylograph.
Flow. Render. Keys - Hylograph.
Flow. Render. Laws - Hylograph.
Flow. Render. Layout - Hylograph.
Flow. Render. Measures - Hylograph.
Flow. Render. Motion - Hylograph.
Flow. Render. Present - Hylograph.
Flow. Render. Reshape - Hylograph.
Flow. Render. Route - Hylograph.
Flow. Render. Sankey - Hylograph.
Flow. Render. Signal - Hylograph.
Flow. Render. Text - Hylograph.
Flow. Render. Transition - Hylograph.
Flow. Render. Tree - Hylograph.
Flow. Render. Unfold