ft-interactive/g-chartcolour

Name: g-chartcolour

Owner: FT Interactive News

Description: A JS module (following the D3 pattern) for colours in FT charts.

Created: 2016-12-08 15:34:53.0

Updated: 2017-12-13 16:55:44.0

Pushed: 2017-12-13 16:34:02.0

Homepage: https://ft-interactive.github.io/g-chartcolour/

Size: 274

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ft-chartcolour

Work in progress.

A JS module (following the D3 pattern) for colours in FT charts.

The colours

using

Either npm install g-chartcolour or you can include it directly in your page via unpkg (or equiv)…

https://unpkg.com/g-chartcolour@0.5.0/build/g-chartcolour.min.js

developing

Clone the repository locally

install dev depenedencies npm install

build the module and the documentation page npm run prepublish

To change an existing palette simply go into the src directory, open the file corresponding to the palette you want to change and edit the appropriate hex code.

To add a new palette create a sensibly named file in the src directory following the example of one of the existing palettes. Each palette exports either a single array eg sequential-multi or a single object eg categorical-uk-politics). The palette should then be added to the index.js file so it gets included in the build.

When you're happy with the palette create a pull request and that's it!


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.