In our last post we covered the basics of adding a custom chart layout. Today’s post will build on that example to cover some of the more advanced configurations that are possible using charts in Sugar. Like the previous post, this is targeted at a beginner to intermediate skilled Sugar Developer who is interested in building custom charts.
Multiple Charts On the Same View
Previously we explored how to display a single chart on a view. Displaying more than a single chart on the view is also very easy too.
In order to add a second chart, you may be tempted to create another chart object in the initialize() method but that is not necessarily how Sugar Charts works. The “chart” property in the view controller is a Chart factory. Chart factories will not affect how your view is rendered unless you do something with them. You can use the same factory’s call() method to construct the same style of chart multiple times.