Skip to content
Timothy M. Shead edited this page Jan 11, 2016 · 5 revisions

The code can manipulate styles in any of three layers:

  • In the canvas/axes code, before a mark is created.
  • In the mark code, when the mark is instantiated.
  • In the HTML code, when the mark is rendered.

We haven't been consistent about where to implement defaults, so here are some guidelines to help cleanup the mess:

  • Default styles - for example: default axis label font size - belong in the mark code.
  • Context specific default styles - for example: when setting defaults for a matrix visualization, not just a set of table axes - belong in the canvas/axes code.
  • The HTML code should not have any style defaults. Rationale: this code may be executed multiple times to create multiple versions of a figure.
Clone this wiki locally