Skip to main content

Adding text

So, you’ve got some data in your system. As explained in the previous topic, this is some simple sales data in JSON format. At this point, all we need is some sample data, and we want it to represent the structure of the real JSON data that the application might work on when it is deployed.

Now let’s add some text and give voice to the sales data. For this, we use the Compose view. In the Compose view, there is an editor with which you can compose scripts. The scripts you compose work together to produce the narratives you want for your data.

The first script is always called Main. The Main script can have subscripts under it, but for now it’s on its own.

Adding Text 01 new.png

To add some text to your project, type in the editor. Let’s start with the title of our project: Monthly Sales.

Note

There is no Save button. The editor automatically saves your work.

Previewing your narrative

Now that you have some text in the editor, try viewing it in Preview Mode.

  1. Click on the Preview button located in the top-right corner of the screen.

    The text you entered, Monthly Sales, forms a very basic script, and when you preview it, you are generating your narrative. Preview Mode shows you the data that is passed into your system as well as the text that comes out. Right now all you have in the script is the text you typed in, so at this point there is no data being passed.

    Adding Text 02 new.png
  2. Click on the Done button, or click somewhere off the Preview Mode overlay, to return to the Compose view.

Formatting text

You can add simple formatting to your scripts using the script editor in the Compose view. For example, you use the formatting bar (the bottom bar, highlighted below in red) to change the style of your text.

Adding Text 04 new.png

The text we have added, Monthly Sales, is the title for our narrative. Let’s change the style to reflect that.

  1. In the editor, place your cursor in the line of text.

  2. Click the Paragraph Format button to change how that line (the paragraph) is formatted.

  3. Select Heading 3.

    Adding Text 05 new.png
  4. (Optional) Click Preview to see your progress. (The formatting change is also apparent in the script editor, without using Preview Mode.)

    Adding Text 06 new.png

Now you have been introduced to the Compose view and you have begun creating your first script. It’s time to start passing data.

Using data values in your text