ChartsOrg / ChartsOrg/Charts

<compiler-generated> line 2147483647 specialized closure #1 Firebase

Open
#4,463 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

We are receiving the crash in our firebase account mentioning about the crashes mainly due to the Chart Library that we have integrated with our code. The crash is not affecting the user interface experience but as per the firebase report, it seems that the code is crashing due to the chart libraries. Here is the screenshot for the firebase errors.

Here is the code used for implementing the Charts.

`@IBOutlet var Graph: LineChartView!`
` var Data: [Double] = []`
`var Days: [String] = []`

> In override func awakeFromNib() below code

`self.Graph.legend.enabled = false`
`Graph.xAxis.drawGridLinesEnabled = false`
`Graph.rightAxis.drawGridLinesEnabled = false`
`Graph.leftAxis.drawGridLinesEnabled = false`
`Graph.rightAxis.drawLabelsEnabled = false`
`Graph.xAxis.labelPosition = .bottom`
`Graph.pinchZoomEnabled = true`

> In override func layoutSubviews()

override func layoutSubviews() {

Graph.zoom(scaleX: Getzoom(), scaleY: 0, x: 0, y: 0 )
let marker = BalloonMarker(color: UIColor(white: 180/255, alpha: 1),
font: .systemFont(ofSize: 12),
textColor: .white,
insets: UIEdgeInsets(top: 8, left: 8, bottom: 20, right: 8))
marker.chartView = Graph
marker.minimumSize = CGSize(width: 80, height: 40)
Graph.marker = marker

}
```

func updateGraph(){


var lineChartEntry = [ChartDataEntry]()
if Days.count > 0
{

for i in 0.. In collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath)

`cell.updateGraph()`

## Charts Environment

**Charts version :3.5.0**
**Xcode version:11.2**
**Swift version:4**
**Platform(s) running Charts:iOS**
**macOS version running Xcode:10.14.4**

> here is total crashes in firebase in the last 7 days

![Screenshot 2020-09-07 at 7 34 00 PM](https://user-images.githubusercontent.com/16713953/92395570-2ab69b00-f141-11ea-848f-3e381c9731ee.png)

> Crash in details

![Screenshot 2020-09-07 at 7 21 28 PM](https://user-images.githubusercontent.com/16713953/92395411-ee833a80-f140-11ea-8d6e-ce8cacbd1e2e.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.