ft-interactive / nightingale-charts

FT style charts, axes, scales etc
http://ft-interactive.github.io/nightingale-charts
12 stars 5 forks source link

Alternative palette for solids (bars and areas). #66

Open kavanagh opened 9 years ago

kavanagh commented 9 years ago

There is a an alternative sequence of colours for use on bars and areas. It has a more limited range of colours. For use when for whatever reason the pinky-browny-grey palette isn't appropriate.

@cnev177 can provide details of the palette.

radiodario commented 9 years ago

Have you seen #65 ? i added the colours specified on #45

kavanagh commented 9 years ago

Yes I saw that. It reminded me to log this issue. The alternative palette doesn't seem to be in that doc you linked to for some reason, it was in earlier versions.

Caroline can hopefully fill in the details.

kavanagh commented 9 years ago

@peter-mouland is this done?

radiodario commented 9 years ago

i think this is done AFAIK

On Tue, Aug 4, 2015 at 12:15 PM Luke Kavanagh notifications@github.com wrote:

@peter-mouland https://github.com/peter-mouland is this done?

— Reply to this email directly or view it on GitHub https://github.com/ft-interactive/o-charts/issues/66#issuecomment-127567910 .

peter-mouland commented 9 years ago

a pre-defined alternate palette isn't available. but users can easily code for different colours.

We could either :

kavanagh commented 9 years ago

How about something like this:


d3.select(svg)
    .data({
      title: 'Large tech companies last week',
      x: {
        series: 'timestamp'
      },
      y: {
        series: [
          {key: 'aapl', label: 'Apple', color: '#00ff00'},
          {key: 'goog', label: 'Google', color: '#ff0000'},
          {key: 'msft', label: 'Microsoft', color: '#0000ff'}
        ]
      },
      data: data
    })
    .call(oCharts.chart.line);
peter-mouland commented 9 years ago

sounds good