Skip to content

Commit

Permalink
Allow setting xVals on Data
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Apr 13, 2016
1 parent 833d982 commit 2bff257
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Charts/Classes/Data/Implementations/Standard/ChartData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,14 @@ public class ChartData: NSObject
/// - returns: the x-values the chart represents
public var xVals: [String?]
{
return _xVals
get
{
return _xVals
}
set
{
_xVals = newValue
}
}

///Adds a new x-value to the chart data.
Expand Down Expand Up @@ -910,5 +917,15 @@ public class ChartData: NSObject
/// MARK: - ObjC compatibility

/// - returns: the average length (in characters) across all values in the x-vals array
public var xValsObjc: [NSObject] { return ChartUtils.bridgedObjCGetStringArray(swift: _xVals); }
public var xValsObjc: [NSObject]
{
get
{
return ChartUtils.bridgedObjCGetStringArray(swift: _xVals);
}
set
{
_xVals = ChartUtils.bridgedObjCGetStringArray(objc: newValue)
}
}
}

0 comments on commit 2bff257

Please sign in to comment.