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

LineChart (gradient fill) is not working in Swift 4 #3580

Closed
manishjaingit opened this issue Jul 25, 2018 · 1 comment
Closed

LineChart (gradient fill) is not working in Swift 4 #3580

manishjaingit opened this issue Jul 25, 2018 · 1 comment

Comments

@manishjaingit
Copy link

What did you do?

I have tried with change version in diploment target 11.2

What happened instead?

Actually, the given code seems in Swift 2.2 and i am looking for the version of swift 4 for the particular graph LineChart (gradient fill), can I have any solution or updated code for this?

Charts Environment

**Charts version/Branch/Commit Number: LineChart (gradient fill) **
Xcode: 9.4
Swift: 4
Platform(s) running Charts:
macOS version running Xcode: 11.2

@thierryH91200
Copy link
Contributor

an example

           set1 = LineChartDataSet(values: yVals1, label: "DataSet 1")
            set1.axisDependency = .left
            set1.colors = [NSColor(red: CGFloat(255 / 255.0), green: CGFloat(241 / 255.0), blue: CGFloat(46 / 255.0), alpha: 1.0)]
            set1.drawCirclesEnabled = false
            set1.lineWidth = 2.0
            set1.circleRadius = 3.0
            set1.fillAlpha = 1.0
            set1.drawFilledEnabled = true
            set1.fillColor = NSColor.white
            set1.highlightColor = NSColor(red: CGFloat(244 / 255.0), green: CGFloat(117 / 255.0), blue: CGFloat(117 / 255.0), alpha: 1.0)
            set1.drawCircleHoleEnabled = false
            set1.fillFormatter = DefaultFillFormatter { _,_  -> CGFloat in
                return CGFloat(self.chartView.leftAxis.axisMinimum)
            }

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