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

How to control colors within a single dataSet? #4166

Closed
theofficejackpot opened this issue Oct 7, 2019 · 1 comment
Closed

How to control colors within a single dataSet? #4166

theofficejackpot opened this issue Oct 7, 2019 · 1 comment

Comments

@theofficejackpot
Copy link

What did you do?

I have one dataset that I display in a pie chart. I am trying to get (or set) the colors for each index so I can align other areas of the app with color-coding.

What did you expect to happen?

ability to get/set colors for individual entries within a single dataset

What happened instead?

Automatic color wheel (changes each refresh) randomly

Charts Environment

**Charts version/Branch/Commit Number: master as of oct1
Xcode version:
**Swift version: 5
Platform(s) running Charts:
macOS version running Xcode:

@rikyfocil
Copy link

Assuming a set of type PieChartDataSet (called set in this example) just do

set.colors = <array of UIColor>

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

No branches or pull requests

3 participants