ChartsOrg / ChartsOrg/Charts

How i show full lines in container

Open
#4,650 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

i plot 30 days data with line view but it show only some days line other lines are cutting off

i mean now i have 29 days data with solid line and the other two days with dashed line but its not showing and i dont want to scroll.

Please help me to overcome this

this is my code

func setCharts(arrChartsValue: [Int], dictNewReports: [String:AnyObject]) {

print(arrChartsValue)

dateFormatter.dateFormat = "dd"

var strdate = dateFormatter.string(from: currentDate)

if strdate.first == "0" {

strdate = strdate.replacingOccurrences(of: "0", with: "")
}

let strConvertInt = Int(strdate)!

let firstN = arrChartsValue.prefix(strConvertInt)

let LastN = arrChartsValue.suffix(arrChartsValue.count - strConvertInt)

arrFirst = arrChartsValue

arrSecond = Array(firstN)

print(arrFirst.count)

print(arrSecond.count)

chartView.drawGridBackgroundEnabled = false

chartView.drawBordersEnabled = false

chartView.leftAxis.enabled = false

chartView.rightAxis.drawAxisLineEnabled = false

chartView.rightAxis.drawGridLinesEnabled = false

chartView.xAxis.drawAxisLineEnabled = false

chartView.xAxis.drawGridLinesEnabled = false

chartView.xAxis.drawLabelsEnabled = false

chartView.leftAxis.drawLabelsEnabled = false

chartView.rightAxis.drawLabelsEnabled = false

chartView.legend.drawInside = false

chartView.dragEnabled = true

chartView.setScaleEnabled(true)

chartView.pinchZoomEnabled = false

chartView.legend.enabled = false

//chartView.autoScaleMinMaxEnabled = true

chartView.notifyDataSetChanged()

self.setChartsValue()


}


func setChartsValue() {

var dataSets : [LineChartDataSet] = [LineChartDataSet]()

var yVals1 : [ChartDataEntry] = [ChartDataEntry]()
for i in 0..

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.