observablehq / observablehq/plot

Themes

Open
#630 16 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
HTML
Stars
5.4k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

To support different styles, we could create a set of plot themes (e.g., dark, light, etc.). As a comparison, the ggthemes package has default styles to emulate popular styles like the Wallstreet Journal, FiveThirtyEight, etc.

Perhaps a simple approach would be to define a set of styles in Plot.themes that could be set as the style property in a Plot:

Plot.plot({
    style: Plot.themes.dark
})

Where Plot.themes.dark has a set of key/value pairs describing the style: {background: "black", color: "white",...}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation of Plot.plot’s style property and determine where a Plot.themes collection could be exposed. Review the proposed dark and light styles and the ggthemes comparison, then define the supported theme set and verify that each theme can be passed through style as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.