Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chart color pallet #436

Closed
tomwayson opened this issue Jun 27, 2018 · 0 comments
Closed

chart color pallet #436

tomwayson opened this issue Jun 27, 2018 · 0 comments

Comments

@tomwayson
Copy link
Member

Add a new top level styles to the definition w/ the first prop being colors: string[].

For cedar-amcharts this will override the chart's default colors property which is set int the theme:

colors: ['#0079c1', '#e4d154', '#5a9359', '#de2900', '#9081bc', '#005e95', '#338033', '#d9bf2b', '#a57946', '#ab3c16', '#7461a8'],

NOTE: that the array of colors is the pallet of colors available to the chart, and is used to supply the default colors for the series but does not have to be 1:1 - there can (and usually should) be more colors in this pallet than there are series.

This seems to be common to most chart libraries:
https://docs.amcharts.com/3/javascriptcharts/AmSerialChart#colors
https://www.amcharts.com/docs/v4/reference/serialchart/#colors_property
https://ecomfe.github.io/echarts-doc/public/en/option.html#color
https://c3js.org/samples/options_color.html
https://naver.github.io/billboard.js/release/latest/doc/Options.html#.color

The beginning of this work has been done in #382. This issue is to capture just the colors property. The background/text colors will be handled in #435 at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants