open-innovations / oi-lume-viz

Lume Plugin that enables charting
https://open-innovations.github.io/oi-lume-viz/
7 stars 1 forks source link

Allow site-specific configuration of colours #21

Closed gilesdring closed 1 year ago

gilesdring commented 1 year ago

Allow default colours and named colour scales, categories, etc for sites.

This should be by providing configuration by passing in as config to the module load (in _config.js/ts).

The additional keys are:

colours:
  background: <default background colour>
  series: <array of colours to cycle in series>
  scales: <object with K:V pairs of scales - keys are JSON safe strings, values are CSS colour styles>
slowe commented 1 year ago

This is a sub-feature of #4

slowe commented 1 year ago

I've added in the ability to define (or redefine) named colours so that brand-specific colours can be set per site.

slowe commented 1 year ago

It is now possible to set:

colours:
  background: <default background colour>
  names: <object with K:V pairs of scales - keys are JSON safe strings, values are CSS colour styles>
  series: <array of colours to cycle in series>
  scales: <object with K:V pairs of scales - keys are JSON safe strings, values are CSS colour styles>