Skip to content

@mk7s/holochart-themes ​

Interfaces ​

InterfaceDescription
ThemeModuleA registrable template module (the runtime's TemplateModule shape), so a theme can be passed to register(...) like a trace or component.

Type Aliases ​

Type AliasDescription
ThemeNameA built-in theme name.

Variables ​

VariableDescription
builtinThemesEvery built-in theme as a template module: register(...builtinThemes).
ggplot2R's ggplot2 look: grey panel, white grid, ggplot's hue palette.
gridonGrid lines on both axes, e.g. 'simple_white+gridon'.
highContrastFor low vision, projectors and print (WCAG 2.2 oriented): black 14 px text on white (21:1), black 1.5 px axis lines with outside ticks, a darker #bdbdbd grid, and a colorway in which every color has at least 3:1 contrast against white (WCAG 1.4.11 non-text contrast; the first four at least 5:1) with hues spread for color-vision deficiencies. Lines are 2.5 px, markers 8 px with a white rim so overlapping points separate; bars get a black outline. Cividis (designed for color-vision deficiency) for sequential data, ColorBrewer PuOr for diverging data. Hover labels are white on black.
highContrastDarkThe dark counterpart of highContrast (plan E17.5), for low vision and for users of dark high-contrast modes: black paper, white 16 px text (21:1), yellow 20 px titles, white 2 px axis lines with long outside ticks, a subdued grid, and a colorway in which every color has at least 7:1 contrast against black (WCAG AAA for text, far above the 3:1 of non-text contrast), with hues after Okabe–Ito so the colors stay apart for color-vision deficiencies. Lines are 3 px, markers 9 px with a black rim so overlapping points separate; bars get a black outline between neighbours. Hover labels are white on black with a yellow border. Cividis for sequential data, ColorBrewer PuOr for diverging data. Pair it with config.a11y.patterns for an encoding that doesn't rely on color at all.
holochartThe default look (ADR-021), applied to every figure without layout.template: a dark, dense chart with a #0a0a0f background, 9 px Helvetica Neue text, tight margins, a horizontal legend above the plot area and the "neon plasma" sequential colorscale. The same object as core's holochartTemplate, which the runtime registers in every bundle.
holochartDarkFormer dark variant of the default look, superseded by holochart (which is dark). An alias of holochart, kept so figures that name it still resolve.
neonThe glow showcase: saturated neon hues on a near-black indigo background, a faint cyan grid, a magenta zero line, and a luminous title halo (title.font.shadow). Markers and bars get a thin white-hot rim and lines are 2.5 px, which reads as a glowing core.
noneThe empty template: the library's schema defaults (Plotly's look), as with layout.template: null. The same object as core's noneTemplate, which every bundle registers.
plotlyplotly.py's default template: blue-grey plot area, white grid, the Plotly colorway, Plasma.
plotly_darkplotly.py's dark template: near-black background, slate grid, light text.
plotly_whiteplotly on white, with light blue-grey grid lines.
plotlyClassicPlotly's look, spelled out (ADR-021): white paper and plot area, #444 text in Open Sans 12 px, the D3 category10 colorway, a light #eee grid, and Plotly's automatic colorscales (Reds, Blues, RdBu). Applying it renders exactly what none renders: charts as Plotly draws them and as Holochart drew them before the default look. setDefaultTemplate('plotly-classic') makes it the default. Use it as the base of a light custom theme: composeTemplates(plotlyClassic, { … }). The same object as core's plotlyClassicTemplate.
presentationLarger text and thicker lines for slides (compose it: 'plotly_white+presentation'): 18 px base font, 3 px lines, 9 px markers, taller table rows.
seabornPython seaborn's "darkgrid" look: lavender-grey panel, white grid, the deep palette.
simple_whiteMinimal white template: no grid, dark axis lines with outside ticks, D3 colors, Viridis.
THEME_NAMESNames of the built-in themes, in the plan's order.
THEMESEvery built-in theme by its registered name.
xgridoffNo vertical grid lines (compose it with another template).
ygridoffNo horizontal grid lines (compose it with another template).

Functions ​

FunctionDescription
defineThemeThe template module for one built-in theme.

Released under the MIT License.