Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
marouferchichi
Product and Topic Expert
Product and Topic Expert

Screenshot 2024-02-01 at 09.10.02.png

Background 

Now that Custom Widget is available with the Unified Story Experience since QRC/Q2 - 2023, and Widget Add-Ons since QRC/Q4 - 2023, we received a large amount of requests coming from SAC users searching for Samples in order to extend the Built-in set of visualisations in SAC.

In this article, I will highlight the Ready-To-Use Custom Widget Samples available in the SAP Public GitHub repository which you can download, edit and consume within SAP Analytics Cloud. You can use these Samples as a starting point to learn how to develop Custom Widget.

In addition I will highlight a Widget Add-on sample which you can use in order to extend the visual elements of the Built-in charts such a Bar chart, and with that you will have the possibility to modify the Tooltip or the Plot area by overwriting existing visual elements content or style.

Note: this article will be always updated every time we develop new Custom Widget Sample. Feel free to let us know your most requested visualisation that you wish to see as Custom Widget in the future in the comment section. Partners and Customers who wants to include their Custom Widget or Widget Add-on samples in this article, they can contact me so I can refer to their blog posts, and with that we can gather more type of visualisation and make it visible for everyone.

Custom Widget Samples: Preview

The Custom Widget Samples that I will preview in this article, are ready to be used within your Story. You can download the resource files and then upload it into your SAC tenant.

You can edit the Custom Widgets by modifying the source code from the resource files if it's required or even extend the Custom Widget by adding new web component files like: Styling.js, in case you wish adding some new settings to the sample. So let's get started with the first preview of our Samples.

Sankey Chart

Screenshot 2024-01-30 at 13.26.31.png

You can download the Sankey Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set measure, set an hierarchical dimension and edit the default colors of the different depths from the Styling panel.

You can refer to this sample in case you want to understand how to add new settings into the Styling panel by creating the Styling.js file.

Gauge Chart

Screenshot 2024-02-01 at 10.09.17.png

You can download the Gauge Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set your measure and from the styling panel set your threshold.

Custom Pie ChartScreenshot 2024-02-01 at 10.25.33.png

You can download the Custom Pie Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set your measure and your dimension. 

Bar Gradient Chart

Screenshot 2024-01-30 at 13.33.53.png

You can download the Bar Gradient Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set your measure and your dimension. 

Funnel Chart

Screenshot 2024-02-01 at 13.33.18.pngYou can download the Funnel Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set your measure and your dimension. You can export the Funnel chart as image from the top right icons, or also edit the data values.

Nested Pie Chart

Screenshot 2024-02-05 at 13.38.30.pngYou can download the Nested Pie Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set your measure and your dimension.

Datepicker

Screenshot 2024-02-07 at 10.07.16.png

You can download the Datepicker from here. This Custom Widget provides a sophisticated input field for date values and date ranges. The date formatting is customizable and a dark mode is provided.

Sunburst Chart

Screenshot 2024-02-28 at 13.47.54.png

You can download the Sunburst Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set measure, set an hierarchical dimension and edit the default colors of the different depths from the Styling panel.

Line Chart

Screenshot 2024-01-30 at 13.36.21.png

You can download the Line Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set your measure and your dimension.

Half Doughnut Chart

Screenshot 2024-02-19 at 09.42.58.png

You can download the Half Doughnut Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, select your data model, set your measure and your dimension.

File Upload Widget

Screenshot 2024-02-20 at 10.08.54.png

The file upload widget extends upon the Data Import API to allow users to upload their FactData CSV or Excel datasets to public and private versions. The widget serves as an intermediary tool, parsing the file and sending the data contained within it to the Data Import API. You can refer to this blog to know more about this Custom Widget.

Pareto Chart

Screenshot 2024-05-02 at 09.30.28.png

You can download the Pareto Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, you can pass your text and press the apply button.   

World Cloud by Input

Screenshot 2024-02-28 at 14.00.39.png

You can download the World Cloud Chart from here, upload it into your SAC tenant, add it to your Unified Story Experience (Optimized mode), from the builder panel, you can pass your text and press the apply button.  

Widget Add-on Samples: Preview

The Widget Add-on Samples are also ready to be used within your Story. You can download the resource files and upload it into your SAC tenant, then from the builder panel you can add the widget add-on to the supported charts to modify the tooltip or the plot area. Learn more how to enable the widget add-on within your story here.

Sample 1

Screenshot 2024-02-06 at 17.17.06.png

You can download this sample from here, upload it into your SAC tenant, add your supported chart (such Bar chart) into the canvas, enable the widget add-on from the builder panel and add your plot area and tooltip. you can edit either the tooltip or the plot area in the design time, but modify the settings from the builder panel, for example you can change the default icons with your own ones.

Sample 2

Screenshot 2024-05-02 at 10.08.33.png

Check out my colleague's blog where he explains in a very detailed way the Widget Add-on that he built. 

 

 

More blogs to check out 👇

 

 

 

19 Comments
JefB
Active Contributor

Hi Marouane,

Great overview!

We would really need ability to also customize table widgets to support advanced planning & reporting requirements in tables/grids (such as ag-grid), for example to achieve better conditional formatting or use scorecard & in-cell charts).
For charts I see a lot of demand for GANTT chart incl. GANTT planning capability and Pareto chart.

abhimanyu_sharma
Contributor
0 Kudos

When I am uploading JSON file , OK button is greyed out.

 

abhimanyu_sharma_0-1709154843768.png

 

marouferchichi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey @abhimanyu_sharma, you need to upload the zip folder as well which contains the web components file (Javascript files).

please refer to this blog to know more about how to upload and host Custom Widget into SAC: https://community.sap.com/t5/technology-blogs-by-sap/hosting-and-uploading-custom-widgets-resource-f... 

and in case you want to host the web component in a different location than SAC, then you need to edit the JSON file. please refer to his blog to know more: https://community.sap.com/t5/technology-blogs-by-sap/hosting-sap-analytics-cloud-custom-widgets-into... 

marouferchichi
Product and Topic Expert
Product and Topic Expert

Hey @JefB ,

Thanks a lot for your feedback !

In the future we will enable the possibility to add Widget Add-on to the Table widget so you can be able to customize and overwrite the different table elements.

regarding the Gantt Chart it's planned to build it as sample

Yours,

Marouene

gradc19
Explorer

Hi @marouferchichi ,

Thank you for detailed overview and code. very helpful. 

gradc19
Explorer

Thanks..

dirk_meyer2
Explorer
0 Kudos

Hi, 

I have uploaded Sankey and Sunburst and they work only with one characteristic layer. As soon as I put a second on into the row they disappear.
Could not find any helpful info. 
Thanks for Help.

 

Dirk

gradc19
Explorer

Hi @dirk_meyer2 ,

I was having this issue recently when I was working with Sankey chart and here is the solution. Please enable "Include aren't Elements." option and it works.

 

gradc19_0-1711464154231.png

Hope it help.

Thanks,

Govinda

dirk_meyer2
Explorer

Hi Govinda
you are using Hierarchies I do not. This option is not available.
But I will try to create one to see if that works
Thanks

dirk_meyer2_0-1711465490861.png

 

marouferchichi
Product and Topic Expert
Product and Topic Expert

Hey @dirk_meyer2 ,

Please try to use hierarchical dimensions in order to see the different depth of the Sankey Chart and also Sunburst chart with enabling "Include Parent Elements". 

Thanks for your comment.

Marouene Ferchichi

gradc19
Explorer
0 Kudos

Agreed with @marouferchichi ,  specially these 2 charts require different nodes and hence hierarchies between the dimension mandatory. 

 

gradc19
Explorer
0 Kudos

Current, code works for 2 levels, if I select Date dimension it shows only till level 2 and when I select 3 /4 widget gets empty. Any advice please.

gradc19_0-1711479510093.png

 

dirk_meyer2
Explorer
0 Kudos

Hi, 

Yes, thanks, I can confirm.
I created on the country ID a hierarchy with Regions and Hubs.
Took a minute of devotion until it got going, but now its much faster then the R Version I have tried.

dirk_meyer2_0-1711529294545.png

 

IngoH
Active Contributor
0 Kudos

Hi,

 

any plans on making the Sankey Chart working with multiple dimensions instead of a hierarchy ?

Regards

Ingo Hilgefort

marouferchichi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey Ingo, 

not for the moment, we are focusing with building new type of vizualisations, but you can edit the source code and give it a try it might work.

Regards,

Marouene Ferchichi

gradc19
Explorer
0 Kudos

Hi @marouferchichi ,

When I tried to see the Sankey chart in view mode or Present mode gets it does not work and pop up with below error. Is that expected with custom widgets & do not work in view / Present mode.

gradc19_0-1712852112134.png

Is anybody else observed this behavior.

Thanks in advance. 

Regards,

Govinda.

 

AngelMesp
Explorer
0 Kudos

Hello @marouferchichi 

Thanks for share your work, very helpful. 

Its possible change the decimal places in measures?, i cant see the option in style panel, so i imagine i need add some code lines right?

Thanks a lot

marouferchichi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey @AngelMesp

yes exactly, you can add the measure format as new setting via script.

Thanks for feedback

Marouene

marouferchichi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey @gradc19

if you see the Sankey chart in edit mode, you should also see it on view mode, first time I see this behaviour. can you try to clean your browser cache and try again ? 

Thanks for your feedback

Marouene