tag:blogger.com,1999:blog-72039374570055786422024-03-05T02:04:21.967-08:00Programming thingsIvanhttp://www.blogger.com/profile/08737730443386958661noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7203937457005578642.post-83894332565991786162015-07-19T06:24:00.002-07:002015-07-19T08:48:22.865-07:00Multiline chart, now with less codeI started adding some convenience classes to <a href="https://github.com/i-schuetz/SwiftCharts">SwiftCharts</a> to create popular charts quickly.<br />
<br />
This is how now a multiline chart is created:<br />
<br />
<pre class="brush: js">
let chart = LineChart(
frame: CGRectMake(0, 70, 300, 500),
chartConfig: ChartConfig(
xAxisConfig: ChartAxisConfig(from: 2, to: 14, by: 2),
yAxisConfig: ChartAxisConfig(from: 0, to: 14, by: 2)
),
xTitle: "X axis",
yTitle: "Y axis",
lines: [
(chartPoints: [(2.0, 10.6), (4.2, 5.1), (7.3, 3.0), (8.1, 5.5), (14.0, 8.0)], color: UIColor.redColor()),
(chartPoints: [(2.0, 2.6), (4.2, 4.1), (7.3, 1.0), (8.1, 11.5), (14.0, 3.0)], color: UIColor.blueColor())
]
)
self.view.addSubview(chart.view)
</pre>
<br />
Of course the "low level" api and examples continue to be available, and should be used when the convenience charts don't provide the required level of customization.
<br />
<br />
More will follow!Ivanhttp://www.blogger.com/profile/08737730443386958661noreply@blogger.com2tag:blogger.com,1999:blog-7203937457005578642.post-84940702767626348382015-07-13T16:07:00.000-07:002015-07-14T18:11:09.639-07:00SwiftCharts: Easy to use and highly customizable charts library for iOSI made <a href="https://github.com/i-schuetz/SwiftCharts">SwiftCharts</a>, an iOS library to create charts, graphs and plots.<br />
<br />
Here is the video:<br /><br />
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/bD6uDF-KckM" width="560"></iframe>
<br /><br />
All these examples are in the Github project.<br />
<br />
<a href="https://github.com/i-schuetz/SwiftCharts">Check it out!</a>Ivanhttp://www.blogger.com/profile/08737730443386958661noreply@blogger.com0