iOS Chart size getting reducing
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to draw a line graph with dotted lines and lines alertanitively
I have more than 200 values from json and I need first 5 values with dotted and next 5 values with lines and continue up to the end of array .
Here I am using array of arrays , The values are json data . I am splitting the values for dotted in to an array and line for another array , both arrays are included in a main array . If sub array is more than 20 the graph size is reducing
```
let data = LineChartData()
for (_, GraphValue) in (param?.enumerated())! {
var lineChartEntry = [ChartDataEntry]()
for items in GraphValue{
let value = ChartDataEntry(x:(items.xValue!/60), y: items.yValue!)
lineChartEntry.append(value)
}
let line1 = LineChartDataSet(values: lineChartEntry, label: "")
line1.drawCirclesEnabled = false
line1.colors = [UIColor(red: 154/255, green: 42/255, blue: 16/255, alpha: 1)]
line1.drawValuesEnabled = false
line1.lineWidth = 2
let graphValue = GraphValue[0]
if (graphValue.isDottedLine){
line1.lineDashLengths = [3,3]
}
line1.mode = .cubicBezier
data.addDataSet(line1)
chartview.data = data
}
```
## 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.
Contributor guide
Assessment
This issue has not been assessed yet.