SAP Analytics Cloud, analytics designer Developer Handbook

SAP Analytics Cloud, analytics designer Developer Handbook

Document Version: 5.1 ? 2020-04-06

Table of Contents

1

Table of Contents

Table of Contents .........................................................................................................................1

Figures ..........................................................................................................................................7

1

About Analytics Designer .............................................................................................10

1.1 What Is an Analytic Application? .....................................................................................10

1.2 What Is Analytics Designer? ............................................................................................10

1.3 What Can You Do with Analytic Applications That You Can't Do with Stories? ..............10

1.4 How Are Stories and Analytic Applications Related to Each Other? ...............................10

1.5 Why Do We Need Both Stories and Analytic Applications? ............................................11

1.6 What Is the Typical Workflow in Creating an Analytic Application?.................................11

1.7 What Are Typical Analytic Applications? .........................................................................12

1.8 How Does Scripting Work in Analytic Applications? ........................................................12

1.9 What's the Scripting Language for Analytic Applications? ..............................................13

2

Getting Started ...............................................................................................................14

2.1 2.1.1 2.1.2 2.1.3 2.1.4

Prerequisites ....................................................................................................................14 Required Access ..............................................................................................................14 Required Roles ................................................................................................................14 Required Licenses ...........................................................................................................14 Modes ..............................................................................................................................15

2.2 2.2.1 2.2.2 2.2.3

Designing Elements .........................................................................................................15 Canvas .............................................................................................................................15 Widgets and Filters ..........................................................................................................15 Data Sources and Models................................................................................................15

2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6

Managing Your Analytic Application ................................................................................16 Transporting an Analytic Application ...............................................................................16 Sharing an Analytic Application .......................................................................................16 Bookmarking Your Analytic Application ...........................................................................16 Translating Your Analytic Application ..............................................................................17 Exporting Your Analytic Application to PDF.....................................................................18 Commenting in Your Analytic Application ........................................................................20

2.4 2.4.1 2.4.2

Navigating from Analytic Application to Another Document or URL ................................21 Create a Story from a Widget ..........................................................................................21 Navigation APIs ...............................................................................................................22

3

3.1

3.2

3.3 3.3.1 3.3.2 3.3.3 3.3.4

Designing an Analytic Application...............................................................................23

Creating ............................................................................................................................23

Browsing ..........................................................................................................................23

Opening Analytic Applications in a Specific Mode...........................................................24 Opening an Analytic Application from File Repository with CRUD Permissions .............24 Opening an Analytic Application from File Repository with Read Permissions ...............24 Opening a Mode with the URL.........................................................................................24 Switching Between Present and View Mode ...................................................................25

Table of Contents

2

3.4 3.4.1 3.4.2

Toolbar Functionalities .....................................................................................................25 Toolbar in Edit Mode ........................................................................................................25 Toolbar in View Mode ......................................................................................................26

3.5 3.5.1 3.5.2 3.5.3

Edit Mode Functionalities .................................................................................................26 Outline and Side Panels ..................................................................................................26 Scripting Section ..............................................................................................................27 Layout Section .................................................................................................................28

4

Scripting in Analytics Designer....................................................................................32

4.1 Why Scripting? .................................................................................................................32

4.2 Scripting Language Overview ..........................................................................................32 4.2.1 Type System ....................................................................................................................32 4.2.2 Tooling ? Code Completion and Value Help....................................................................32 4.2.3 Events ..............................................................................................................................32 4.2.3.1 Application Events ........................................................................................................32 4.2.3.2 Individual Widget Events ..............................................................................................33 4.2.4 Global Script Objects .......................................................................................................33 4.2.5 Accessing Objects ...........................................................................................................33 4.2.6 Script Variable..................................................................................................................33 4.2.7 Timer ................................................................................................................................34 4.2.7.1 Script APIs ....................................................................................................................35 4.2.7.2 Sample 1 ? Create Animation .......................................................................................35 4.2.7.3 Sample 2 ? Automatically Play the Application ............................................................35

4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6

Script Editor......................................................................................................................36 Creating and Editing Event-Based Scripts.......................................................................36 Creating and Editing Functions in Global Script Objects .................................................38 Script Editor Layout..........................................................................................................39 Keyboard Shortcuts .........................................................................................................40 Info Panel: Errors and Reference List..............................................................................40 Renaming Widgets, Script Variables, and Script Functions ............................................40

4.4 Scripting Language Features...........................................................................................40 4.4.1 Typing ..............................................................................................................................40 4.4.2 No Automatic Type Casting .............................................................................................41 4.4.3 Accessing Objects ...........................................................................................................41 4.4.4 Finding Widgets with Fuzzy Matching .............................................................................41 4.4.5 External Libraries .............................................................................................................42 4.4.6 Debugging with console.log()...........................................................................................42 4.4.7 Loops ...............................................................................................................................42 4.4.7.1 for ..................................................................................................................................42 4.4.7.2 while ..............................................................................................................................43 4.4.7.3 for in ..............................................................................................................................43 4.4.8 Double and Triple Equals Operators ...............................................................................43 4.4.9 if and else Statements .....................................................................................................44 4.4.10 this 44 4.4.11 switch Statements ............................................................................................................44 4.4.12 break Statement...............................................................................................................45 4.4.13 Debugging Analytics Designer Scripts in the Browser ....................................................45

4.5 Working with Data ............................................................................................................48

Table of Contents

3

4.5.1 Range and Exclude Filters ...............................................................................................48 4.5.1.1 Exclude Filters ..............................................................................................................48 4.5.1.2 Range Filters.................................................................................................................49 4.5.2 Dimension Properties.......................................................................................................50 4.6 Method Chaining ..............................................................................................................50 4.7 Script Runtime .................................................................................................................50 4.8 The R Widget and JavaScript ..........................................................................................51 4.9 Differences Between Analytics Cloud and Lumira...........................................................52

5

Widget Concepts, APIs, and Usages ...........................................................................53

5.1 5.1.1 5.1.2

Basic Widget Concepts ....................................................................................................53 Supported Widgets ..........................................................................................................53 Custom Widgets...............................................................................................................53

5.2 The Builder Panel ............................................................................................................54

5.3 The Styling Panel .............................................................................................................54

5.4 Action Menu .....................................................................................................................55

5.5 Script Editor View.............................................................................................................55

5.6 Table ................................................................................................................................56 5.6.1 Table APIs........................................................................................................................56 5.6.2 More Table APIs ..............................................................................................................58 5.6.2.1 Compact Display ...........................................................................................................58 5.6.2.2 Zero Suppression..........................................................................................................58 5.6.2.3 Dimension Properties ...................................................................................................58 5.6.3 Table Events ....................................................................................................................59

5.7 5.7.1 5.7.2

Chart ................................................................................................................................59 Chart APIs ........................................................................................................................59 Chart Events ....................................................................................................................61

5.8 Result Set APIs ................................................................................................................61 5.8.1 Using the getResultSet API .............................................................................................61 5.8.1.1 Newly Added Cells of a Table.......................................................................................65 5.8.1.2 Specify Input Parameter and Filter Result ....................................................................68 5.8.1.3 Forecast and Smart Grouping ......................................................................................73 5.8.2 Using the getDataSelections API.....................................................................................77 5.8.2.1 Specify Input Parameter and Filter Result ....................................................................78 5.8.3 Using the getResultMember API......................................................................................78

5.9 Widget Level Refresh Data API .......................................................................................80

5.10 Prompt API.......................................................................................................................81 5.10.1 Using openPrompt() .........................................................................................................81 5.10.2 Using getVariables() ........................................................................................................81 5.10.3 Using setVariableValue() .................................................................................................82 5.10.3.1 Single Variable Values..................................................................................................82 5.10.3.2 Multiple Variable Values ...............................................................................................83 5.10.3.3 Comparisons .................................................................................................................83 5.10.3.4 Ranges..........................................................................................................................83 5.10.4 Using removeVariabeValue()...........................................................................................83 5.10.5 Using copyVariableValueFrom() ......................................................................................84

Table of Contents

4

5.11 Popup and Dialog ............................................................................................................84 5.11.1 Main Popup and Dialog APIs ...........................................................................................85 5.11.2 Button-Related Popup and Dialog APIs...........................................................................85 5.11.3 Popup and Dialog Events ................................................................................................85 5.11.4 Known Limitations with Popup and Dialog.......................................................................86 5.12 Text Widget ......................................................................................................................86 5.12.1 Changing Text..................................................................................................................86 5.12.2 Adding Dynamic Text .......................................................................................................86 5.13 RSS Feed.........................................................................................................................87 5.14 R Visualization .................................................................................................................87 5.15 Geo Map ..........................................................................................................................88 5.16 Layout APIs......................................................................................................................88 5.17 Set Theme API.................................................................................................................91 5.18 Loading Indicator .............................................................................................................92 5.18.1 Automatic Loading Indicator ............................................................................................92 5.18.2 Using APIs to Show and Hide Loading Indicator .............................................................92 5.19 Load Bookmark API .........................................................................................................93 5.20 Notification API ................................................................................................................94 5.21 Move Widget API .............................................................................................................95

6

Typical Patterns and Best Practices ............................................................................97

6.1 Switching Between Chart and Table................................................................................97

6.2 Selecting Measures via Dropdown or Radio Button to Filter Table and Chart to Display (Single Selection) ..............................................................................................101

6.3 Selecting Measures via Dropdown to Filter Table and Chart to Display (MultiSelection) .......................................................................................................................108

6.4 Using Filter Line for Filtering Table, Chart, and R Visualization ....................................118

6.5 Cascaded Filtering .........................................................................................................124

6.6 Add and Remove Dimension in Rows and Columns for Table......................................131

6.7 Creating a Settings Panel Using a Popup Window........................................................152

6.8 Selection Handling in a Table or Chart and Open a Details Popup...............................171

6.9 Using R Widget Word Cloud for Visualization ...............................................................193

6.10 Set User Input for Planning Data ...................................................................................213

7 7.1 7.2 7.3 7.4 7.5 7.5.1 7.5.2 7.6 7.6.1 7.6.2

Planning ........................................................................................................................215 What to Expect from Analytics Designer Regarding Planning?.....................................215 Basic Planning Concepts in Analytics Designer ............................................................215 Refreshing Your Data ....................................................................................................217 Set User Input ................................................................................................................217 Planning Versions ..........................................................................................................218 Private Versions .............................................................................................................218 Public Versions ..............................................................................................................218 How to Manage Versions ...............................................................................................219 Publishing and Reverting Data Changes .......................................................................219 Copy ...............................................................................................................................221

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download