Create Composites
Create a composite in SAP Analytics Cloud, which can be reused across stories.
Create a Composite
Procedure
Next Steps
You've created and saved a composite. Story designers or developers can then import it to stories and use it as other built-in widgets. For more information, refer to Use Composites in Story Designs.
Furthermore, in advanced mode, you can add scripts to your composite to implement custom logic. You can also define interface properties, functions, and events for story designers or developers to further customize the composite. For more information, refer to Define Interface Properties, Functions, and Events in Composites.

Set Variables for Your Composite
When you create the first chart or table using a data source that requires you to set variables, a prompt appears for you to do so. The variables are applied to all tables and charts in the composite that use the data source.
To change composite variables, from Tools in the toolbar, select Edit Prompts and then the data source to open the variables dialog.
-
For a table: In its subtitle area, select (Edit Table Prompts) to open the variables dialog. Then, select Set Table Variables, and set the variable values.
-
For a chart: In its (More Actions) menu, select to open the variables dialog. Then, select Set Chart Variables, and set the variable values.
If you want the table or chart to use composite variables, select Use Composite Variables in its variables dialog.
Define Thresholds for Your Composite
You can create composite defined thresholds and add them to the chart measures in your composite.
To create composite defined thresholds, select Conditional Formatting from Tools menu of the toolbar. The Conditional Formatting panel opens, where you can view all model defined and composite defined thresholds in your composite.

In the Composite Defined section, select + Add Threshold, and create one in the Thresholds panel following the same steps as creating story defined thresholds. For more information about thresholds, you can refer to Create Story-Defined Thresholds.
To add the threshold to a chart, in its Builder panel, hover over the related measure, and select and then the threshold. You can find that it's applied to the chart.
Set Size for Your Composite
You can set your composite's size in the Styling panel, which will be its initial size when it's added to stories.

-
Dynamic: The composite’s size will be automatically adjusted when it’s added to stories, considering the space of its widgets inside.
-
Defined: The width and height defined will be the composite's initial size when it's added to stories. Story designers can modify the size in the composite's Styling panel.
Under Size you can select one of the following sizes: Letter, Legal, Tabloid, A3, A4, B4, B5, 16:9 (HD). You can change the orientation to either portrait or landscape.
You can also select Custom to enter the width and height of the composite.
Define CSS for Your Composite
You can set a CSS class name for the whole composite or an individual widget inside so that story designers can further customize the styling in the CSS editor without using CSS APIs.
-
To set a CSS class name for all widgets in the composite, select Global Settings from the Outline panel or from Composite Settings in the File menu of the toolbar. Enter a global default class name.
-
To set a CSS class name for an individual widget in the composite, go to its Styling panel. Enter a name of the widget-level CSS class, which overwrites the global default one.
When the composite is added to a story, story designers can write CSS for all or individual widgets inside with the corresponding names set in Composites.

