Data Visualization controls in SAP Cloud Platform SDK for iOS

In the SDK release of 2.1 there are new controls introduced for visualizing business data in the form of charts. Visualizing business data is a powerful way to gain insights into the underlying data. Line charts over a period of time is also an effective way to easily see trends in business data.

Depending on the business scenario, a particular chart type may be selected when building an application. The classes in the SDK used for working with charts and analytics data are categorized under Chart Floorplan and Analytics Cards. The classes start with FUIChart and FUIKPI prefixes.

In this blog, we will describe how to use the FUIChartFloorplanViewController for adding a Bar Chart. The following process will be used for adding the Bar Chart:

We will generate an Master Detail application from Assistant connecting an API endpoint on Business Hub.

We will create a FUIChartFloorplanViewController for a Bar Chart that has sample data to chart.

We will add a cell to the collection that will invoke the Bar Chart ViewController when selected

We will change the Collections Table View to invoke the Bar Chart ViewController when the cell is selected.

5 Comments

thanks for writing that blog post and for giving some more insights into the new chart functionality.

However I have some issues with the documentation of the functionality. Yesterday I had a look on it and I didn’t find no information about the chart functionality (beside the release notes and API reference) in the official documentation.

Then I had just a look to the API reference, but that kind of documentation (which is just the jazzy generated documentation) does not give any information on how the components are strutured and how the components can be used. With the help of the iOS Fiori Design Guidelines it can be assumed, that the charts can be used (using the corresponding artifacts) in a header, table view cell, collection view cell and as view controller. But is it also supported and recommended that a FUIChartView can be used without using one of the provided container objects?

Also some pieces are not part of the API reference, e.g. the FUIChartViewDataSource protocol, which you used above, or the FUIChartViewDelegate.

From my point of view it is great to have such a functionality now, but the usage/implementation time could be much faster with a better documentation. At the moment it is more a trial and error scenario until the undocumented pieces are clear. I think having a better description as part of the documentation would save many people a lot of hours. The guides in the “Other Guides” section of the API reference are going into the right direction, but they are available just for a little part of the provided functionality. Tutorials on the SAP Developer Tutorials area are also ok, but from my experience, they in most cases they are just describing the functionality on a high level with a simple example.

Thanks for your comments. We are continuously working on enhancing our documentation. In the interim we will continue to have blogs and tutorials to cover the gaps in our documentation. This blog is an attempt to fill in some of the gaps. Also, please feel free to reach out to me if there is any specific area you need more help or more tutorials/sample code.

Thanks for providing such a tutorial. It’s really exciting to see there are resources available for the new features. However, when I followed the code example, I couldn’t get the additional cell to display on the table.

In the switch statement for returning the table cell, I tried to inspect the indexPath passed in and there is no instance that will fallback to the default case.