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

There should be an option to supply a custom color function #136

Closed
cal-smith opened this issue Jan 16, 2019 · 2 comments
Closed

There should be an option to supply a custom color function #136

cal-smith opened this issue Jan 16, 2019 · 2 comments

Comments

@cal-smith
Copy link
Contributor

So colors for lines/bars/pie/etc can be determined based on the data or any other metric.

A potential signature could be:

function(data: any, chart: any): string

Where data is the current data being displayed, and chart is either a reference to the chart instance, or a reference to the config (whichever is sufficiently powerful).

@theiliad
Copy link
Member

Good idea. Will take a look soon

@asahlin
Copy link

asahlin commented Jan 24, 2019

This is something we need, having the color of the bar based on threshold values. Here is the design for a 1st quarter deliverable to gen1 details page.

image

t-mullen added a commit to t-mullen/carbon-charts that referenced this issue Feb 27, 2019
Implements dynamic colors through two function options. Allows changing colors of elements based of
dataset, label or value.

carbon-design-system#136
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

3 participants