You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
When I first time invoke addLine function it works great (line appears with animation), but when I try add second line by invoking the same addLine function, first line appears with animation but second line and other appear without animation.
`@IBAction func addLine(_ sender: UIButton) {
let data2: [CGFloat] = [1, 3, 5, 13, 17, 20]
lineChart.colors.append(UIColor.cyan)
lineChart.addLine(data2) // add second line
}
override func viewDidLoad() {
super.viewDidLoad()
label.text = "..."
label.translatesAutoresizingMaskIntoConstraints = false
label.textAlignment = NSTextAlignment.center
self.view.addSubview(label)
// simple arrays
let data: [CGFloat] = [3, 4, 2, 11, 13, 15]
// simple line with custom x axis labels
let xLabels: [String] = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
//lineChart = LineChart()
lineChart.animation.enabled = true
lineChart.area = true
lineChart.x.labels.visible = true
lineChart.x.grid.count = 10
lineChart.y.grid.count = 10
lineChart.x.labels.values = xLabels
lineChart.y.labels.visible = true
lineChart.addLine(data) //add first line
lineChart.dots.outerRadius = 6
lineChart.dots.innerRadius = 4
lineChart.colors = [UIColor.black]
lineChart.translatesAutoresizingMaskIntoConstraints = false
lineChart.delegate = self
// Do any additional setup after loading the view, typically from a nib.
}`
The text was updated successfully, but these errors were encountered:
Hello!
When I first time invoke addLine function it works great (line appears with animation), but when I try add second line by invoking the same addLine function, first line appears with animation but second line and other appear without animation.
`@IBAction func addLine(_ sender: UIButton) {
The text was updated successfully, but these errors were encountered: