I need advice on the most performant setup for a IGChartView with a line series. It's really basic, but I'm second guessing the previous designs that I've used because maybe something new has been released in the interim. Here are my realm objects:
class RecordingRow: Object {
dynamic var createdOn:NSDate = NSDate()
let measurements = List<Measurement>()
}
class Measurement: Object {
dynamic var value:Double?
Hi,
This should be pretty straight forward with the category line series and a datasource helper. Your options for empty values are to either interpolate between two known values or create breaks in your line. This is done with unknownValuePlotting property of the IGLineSeries. I'm not sure exactly what you plan on doing with the optional values, but if you just want to omit them, you can use the entire column of your data in the datasource helper. By default the category labels get pre-calculated, but you can turn that off by setting autoGenerateLabels to false on your datasource helper and instead use a delegate method off IGChartViewDelegate:
optional public func chartView(chartView: IGChartView, labelForAxis axis: IGAxis, withItem item: NSObject, oldLabel: String) -> String
Which data source helper? How about rolling my own?
What does autoGenerateLabels do, exactly?
How do I know what x-xvalue (timestamp) I'm dealing with using the delegate method chartView:labelForAxis:withItem? The best I can surmise is encoding the unix timestamp as a string and then formatting it on-demand in the aforementioned delegate method.