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

Swift: Different colours for circles in one LineChartDataSet #2824

Closed
high5Fly opened this issue Sep 25, 2017 · 3 comments
Closed

Swift: Different colours for circles in one LineChartDataSet #2824

high5Fly opened this issue Sep 25, 2017 · 3 comments

Comments

@high5Fly
Copy link

high5Fly commented Sep 25, 2017

screen shot 2017-09-25 at 3 10 51 pm
Hi,

Currently I am trying to set different colours for the values of a DataSet. The colours depends on the range of the values. For example if we have a positive range of 70 up to 100, all values in this range will be green, below will be purple and above will be red.
Could you please assist me here?

KR,
Miroslav

@thierryH91200
Copy link
Contributor

it's #2334 without the highlight point

i don't know the author

**input your own logic for how you actually want to color**
func colorPicker(value : Double) -> NSUIColor {
   
        if value > 100 || value < 50 {
            return NSUIColor.red
        }
        else {
            return NSUIColor.black
        }
    }

@thierryH91200
Copy link
Contributor

it's not the same approach like denrase/Charts@84409e4

not subclass renderer

@high5Fly
Copy link
Author

Yes, I saw. I was browsing the wrong tab. Your suggestion worked perfectly! Thank you very much!

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

2 participants