Open kavanagh opened 9 years ago
Have you seen #65 ? i added the colours specified on #45
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.
@peter-mouland is this done?
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 .
a pre-defined alternate palette isn't available. but users can easily code for different colours.
We could either :
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);
color
attribute is not set (or null) for a given y series then the default colors array is used.sounds good
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.