SAPinsider

articles

How to Easily Switch Themes in SAP Analytics Cloud Stories (Light and Dark Mode)

How to Easily Switch Themes in SAP Analytics Cloud Stories (Light and Dark Mode)

Manually switching themes in a story is common in SAP Analytics Cloud, but did you know you can add a toggle switch to seamlessly switch between themes, such as light and dark modes? This feature allows users to personalize their stories to better suit their preferences. 

Step-by-Step Guide to Adding a Theme Toggle Switch

Step 1: Add a Switch to Your Story To start, add a toggle switch to your story. This will act as the trigger for switching between themes.

Toggle switch in SAP Analytics Cloud story for switching between light and dark themes.

Step 2: Add the Script Add the following (or similar) script to the switch. Don't worry about filling in the variables yet—we’ll guide you through finding the correct theme IDs: 

Code snippet for adding a script to the toggle switch in SAP Analytics Cloud to enable theme switching between light and dark modes.

Step 3: Locate Your Theme IDs The script for this functionality is very simple, but theme IDs are not as easily accessible as story IDs in SAP Analytics Cloud, so you'll need to use the browser's console "Network" tab to locate them. 

Locate Your Themes

  1. Open the folder containing your themes in your SAP Analytics Cloud tenant.

  2. Open your browser’s developer tools (usually accessible via F12 or right-click > Inspect).

  3. Navigate to the Network tab.

Browser developer tools displaying Network tab with resource IDs for SAP Analytics Cloud themes.

Fill in the form on this page to read the full article.