Skip to content

Commit

Permalink
Merge pull request #493 from liuxuan30/onlylineData
Browse files Browse the repository at this point in the history
if only line data exists and no other data, turn _deltaX to 1.0
  • Loading branch information
danielgindi committed Oct 23, 2015
2 parents fe3b30d + 8e1bcbd commit 2ea751b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Charts/Classes/Charts/CombinedChartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public class CombinedChartView: BarLineChartViewBase, LineChartDataProvider, Bar

_deltaX = CGFloat(abs(_chartXMax - _chartXMin))
}
if (_deltaX == 0.0 && self.lineData?.yValCount > 0)
{
_deltaX = 1.0
}
}

public override var data: ChartData?
Expand Down

0 comments on commit 2ea751b

Please sign in to comment.