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

what about the property 'gradientPositions' on branch 4.0.0, and how to use #3584

Closed
1 task done
randy-Zhang opened this issue Jul 27, 2018 · 3 comments
Closed
1 task done

Comments

@randy-Zhang
Copy link

randy-Zhang commented Jul 27, 2018

ℹ Please fill out this template when filing an issue.
All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info.

Per our *CONTRIBUTING guidelines, we use GitHub for
bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag ios-charts.

Please remove this line and everything above it before submitting.

What did you do?

ℹ Please replace this with what you did.

What did you expect to happen?

ℹ Please replace this with what you expected to happen.

What happened instead?

ℹ Please replace this with of what happened instead.

Charts Environment

Charts version/Branch/Commit Number:
Xcode version:
Swift version:
Platform(s) running Charts:
macOS version running Xcode:

Demo Project

ℹ Please link to or upload a project we can download that reproduces the issue.

@pmairoldi
Copy link
Collaborator

You can look at the line chart code in the demo project. Basically the positions are where the colors change. For example,

dataSet.setColors(.blue, .red, .green)
dataSet.gradientPositions = [0, 50, 100]

would mean that it starts at blue (0 % of line), transitions to red (50% of line), then transitions to green (100% of line).

@ubair-hamid
Copy link

Hi,

Can someone please mention what is the alternate for gradientPositions in master branch?

Thanks

@randy-Zhang
Copy link
Author

Hi,

Can someone please mention what is the alternate for gradientPositions in master branch?

Thanks

on master branch isn't have property gradientPositions, and you can use it on branch 4.0.0
You can look at the line chart code in the demo project. Basically the positions are where the colors change. For example,
dataSet.setColors(.blue, .red, .green) dataSet.gradientPositions = [0, 50, 100]

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