@mk7s/holochart-themes
Interfaces
| Interface | Description |
|---|---|
| ThemeModule | A registrable template module (the runtime's TemplateModule shape), so a theme can be passed to register(...) like a trace or component. |
Type Aliases
| Type Alias | Description |
|---|---|
| ThemeName | A built-in theme name. |
Variables
| Variable | Description |
|---|---|
| builtinThemes | Every built-in theme as a template module: register(...builtinThemes). |
| ggplot2 | R's ggplot2 look: grey panel, white grid, ggplot's hue palette. |
| gridon | Grid lines on both axes, e.g. 'simple_white+gridon'. |
| highContrast | For 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. |
| highContrastDark | The 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. |
| holochart | The 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. |
Former dark variant of the default look, superseded by holochart (which is dark). An alias of holochart, kept so figures that name it still resolve. | |
| neon | The 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. |
| none | The 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. |
| plotly | plotly.py's default template: blue-grey plot area, white grid, the Plotly colorway, Plasma. |
| plotly_dark | plotly.py's dark template: near-black background, slate grid, light text. |
| plotly_white | plotly on white, with light blue-grey grid lines. |
| plotlyClassic | Plotly'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. |
| presentation | Larger text and thicker lines for slides (compose it: 'plotly_white+presentation'): 18 px base font, 3 px lines, 9 px markers, taller table rows. |
| seaborn | Python seaborn's "darkgrid" look: lavender-grey panel, white grid, the deep palette. |
| simple_white | Minimal white template: no grid, dark axis lines with outside ticks, D3 colors, Viridis. |
| THEME_NAMES | Names of the built-in themes, in the plan's order. |
| THEMES | Every built-in theme by its registered name. |
| xgridoff | No vertical grid lines (compose it with another template). |
| ygridoff | No horizontal grid lines (compose it with another template). |
Functions
| Function | Description |
|---|---|
| defineTheme | The template module for one built-in theme. |