Symptom
- The requirement is creating many charts for different datasets with different filter.
- And when the special chart contains no data, user want to make it be hidden but not shown with no data information.
Environment
SAP Analytics Cloud 2025.08
Resolution
The requirement can be done by using scripting in Optimized Experience Design of stories. The following can be an example method.
- Go to Edit mode to modify the Optimized Experience Design of story
- Go to Outline panel and find the chart object.
- Click fx button and edit the onResultChanged function
- Add one line code as below and save the story.
Chart_1.setVisible(!Chart_1.getDataSource().isResultEmpty());
* User needs to change Chart_1 to be the actual chart id for the above sample code.
* The code logic is first examine the chart data source. And set with the opposite value for the visible properties. E.g. when data source empty is true, then set visible as opposite value false.
* This sample code needs to be used when there is some action which can trigger the result change for the chart. E.g. there is other page filter, or input control which can used for changing the data for the chart to trigger this onResultChanged function.
See Also
- 2569847 - Where can you find SAC user assistance (help) to use, configure, and operate it more effectively?
- Have a question? Ask it here and let our amazing SAP community help! Or reply and share your knowledge!
- 2487011 - What information do I need to provide when opening an case for SAP Analytics Cloud?
- 2511489 - Troubleshooting performance issues in SAP Analytics Cloud
- Search for SAP Analytics Cloud content using Google or Bing:
-
- Note: Add relevant text or warning/error messages to the text search field to filter results.
- SAP Analytics Cloud Connection Guide
- Getting Started with SAP Analytics Cloud Expert Community page
- SAP Analytics Cloud Get More Help and SAP Support
- Need More Help? Contact Support or visit the solution finder today!
Your feedback is important to help us improve our knowledge base.
Keywords
waterfall chart, sap analytics cloud, independent display, multiple companies, chart customization, data visualization, sap sac, story filters, charting limitations, sap analytics charting, hide, invisible, program, sdk, script , KBA , LOD-ANA-DES , Story Design & Visualizations , LOD-ANA-UNS-SDK , Unified Story Custom Widget and Hosting , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , How To