18 Create further Views

By the end of this exercise you will be able to:

  • Create a line chart (time series)
  • Create a bar chart
  • Create a pie chart
  • Create an aggregate view

Note in this exercise that you set Series, Data Point attributes and Horizontal Axis Attributes by dragging table attributes into the boxes against these fields.

Create a line chart (time series)

You will create a line chart, plotted over time, of debt levels broken down by payment means.

  1. Create a Screen
    1. Click on Screen from the application home screen.
    2. Click  Add New.
    1. Set the screen name to: Debt levels by payment means
    2. Select a Template e.g. Tile No Buttons.
    3. Click the Create Screen button.
    4. A new screen will open based on your template.
  2. Now create a new view on the screen
    1. From the screen's toolbar, click  Tables.
    2. Drag the table Overall debt levels onto the screen.
    3. Choose a Line Chart view.
    4. This creates a view - configuration options for the view show on the right.
    5. The Available Attributes box will be shown.
      1. Attributes can also be displayed by clicking  Show Attributes in the toolbar.
    6. Drag attributes on the view as follows:

      FieldAttribute

      SERIES

      PaymentMeans

      Y ATTRIBUTESDebtLevel
      X ATTRIBUTECalculationDate
    7. To see the chart, switch to  Application Mode. To update the chart again, go back into  Design Mode.

    8. To complete the setup, we will label the axes. In the screen, right-click on the view (the line chart) and select  Show view configuration.

    9. In the settings on the right:

      1. Click  Apply to save your changes. This is required in order to update the options below.
      2. Update the name of the view to Debt levels by payment means
      3. Set the Display Type to Line Chart (time).

      4. Scroll down to the Chart Layout section and enter the following settings:

        FieldValue

        Show Legend

        Horizontal Axis Title

        Calculation Date

        Label angle

        Horizontal

        Vertical Axis Title

        Debt level
    10. Click  Apply and Close to save your changes and close the window.
    11. Go into Application Mode to see the chart.

Setting an upper limit

There is one data point in the data which is much greater than all the others, so movements in the levels of debt cannot be seen. We can exclude this outlier and generate a more useful graph.

  1. Switch back to  Design Mode and  Show view configuration
  2. In the Chart Layout section, add a Maximum Value to the Vertical Axis of 30000

Then view the chart to see the results.

Setting a lower limit

You decide you are only interested if there is a debt level of more than 5,000.

  1. Under Vertical Axis, set Minimum Value to 5000

Then view the chart to see the results.

Fixing the scale

You now decide that you want to show the graph always including the Vertical Axis (Y) starting at zero:

  1. Under Vertical Axis, set the Minimum Value to 0
  2. Fixed Scale: 

Then view the chart to see the results.
Note: Fixed Scale is relevant when the graph data changes. The Minimum Value and Maximum will always be plotted on the Vertical Axis (Y), even when the largest data value is lower than the Maximum Value and the lowest data value is larger than the Minimum Value.

Create a bar chart

Now you will create a graph of the same data, but this time using a bar chart.

  1. Create a screen called Debt levels by payment means 2
  2. Select a Template e.g. Tile No Buttons.
  3. Now create a new view on the screen.
  4. From the screen's toolbar, click  Tables.
  5. Drag the table Overall debt levels onto the screen.
  6. Select the view type   Vertical Bar Chart.
  7. Drag attributes into the view as follows:

    SERIESPaymentMeans
    Y ATTRIBUTESDebtLevel
    X ATTRIBUTECalculationDate
  8. Right-click and  Show view configuration.
    1. Update the name of the view to Debt levels by payment means 2
    2. Set the Display Type: Bar Chart (vertical)
    3. Update the following settings:

      Show Legend

      Horizontal Axis Title

      Calculation Date

      Label Angle

      Sloping

      Vertical Axis Title

      Debt level
  9.  Apply and Close the settings.

  10. Go into Application Mode to view the results.

The view looks very cluttered – but we will filter this later to make this more useful.

Create an aggregate grid view

Now you will create a grid view on the data in Overall Debt Levels, but to show aggregated totals by payment method:

  1. Create a screen called Debt totals by payment means.
  2. Select a Template e.g. Tile No Buttons.
  3. From the screen's toolbar, click  Tables.
  4. Drag the table Overall debt levels onto the screen.
  5. Select the view type  Grid.
  6. Drag the following attributes onto the view:
    • PaymentMeans
    • DebtLevel
    • Count()
  7. We want to group the results by PaymentMeans, and for each value of this, sum the DebtLevel:
    1. Right-click on the grid and select  Show view configuration
    2. Update the Name of the view to Debt totals by payment means
    3. Double-click on DebtLevel in the View Attributes list:
      • Set the Name to TotalDebtLevel
      • Select the Aggregate Function: Sum
      • Press  Apply and Close.
  8. Press  Apply and Close on the View settings to save your changes.

You should now see an aggregate view with an entry per Payment Means - 3 rows in total - with, for each, a sum of entries for that Payment Means, and a total debt level.

Create a pie chart

Now you will create a further chart on the table Overall Debt Levels, to give an overview of proportions of debt by various payment means. Create a new screen and view with the settings:

Name

Debt overview by payment means

Display Type

  Pie Chart

DATA ATTRIBUTE

DebtLevel - Once you have added it to the View, make this an aggregate attribute:

  • Right-click and  Show view configuration
  • Double click DebtLevel in the View Attributes section to open the View Attribute settings
  • Set the Aggregate Function to Sum
  • Save your changes

LABEL ATTRIBUTE

PaymentMeans

Show Legend

Show Values on Charts