Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameanalysis
nopaneltrue

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. Creating a line chart is illustrated by the following video:

Widget Connector
width

...

800
urlhttps://www.youtube.com/watch?v=qOS22GOeyyA
height500

To recap on the steps in the video:

...

  1. Create a Screen
    1. Click on Screen from the application home screen.
    2. Click 
      Insert excerpt
      _add
      _add
      nopaneltrue
      .
    1. Set the screen name to: Debt levels by payment means

...

  1. If you already have this open, use the PhixFlow task bar (grey bar at the bottom of the screen) to navigate back to the model
  2. If this is not already open, in the repository, navigate to Analysis Models, find the model, right click and select Display

...

    1. Select a Template e.g. Tile No Button.
    2. Click the Create Screen button.
    3. A new screen will open based on your template.
  1. Now create a new view on the screen
    1. From the screen's toolbar click
      Insert excerpt
      _tableOnly
      _tableOnly
      nopaneltrue
    2. Drag the table Overall debt levels onto the screen.
    3. Choose a Line Chart view.
    4. This creates a

...

    1. view - configuration options for the

...

    1. view show in the

...

    1. screen; the configuration form for the

...

    1. view also pops up in the repository

...

    1. .
    2. The available attributes will be shown.
      1. Attributes can also be displayed using the the view configuration properties form by clicking
        Insert excerpt
        _attributes_show
        _attributes_show
        nopaneltrue
        .
    3. Drag attributes into the configuration options on in the

...

    1. view as follows:

      FieldAttribute

      SERIES

      PaymentMeans

      Y ATTRIBUTESDebtLevel
      X ATTRIBUTECalculationDate

      Notice that as you drag attributes across, they are added to the list of

...

    1. view attributes, with the appropriate role set. For DebtLevel (Y axis), the correct role is Data Point.

    2. To see the chart,

...

    1. switch to App mode,

      Insert excerpt
      _app_mode
      _app_mode
      nopaneltrue
      . To update the configuration again, go back into Design mode,
      Insert excerpt
      _design_mode
      _design_mode
      nopaneltrue
      .

    2. To complete the configuration, we will label the axes. In the

...

    1. screen, right-click on the view and

...

    1. select 

      Insert excerpt
      _view_show
      _view_show
      nopaneltrue
       configuration.

    2. In the

...

    1. view configuration form:

...

      1. Click 
        Insert excerpt
        _save
        _save
        nopaneltrue
         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)

...

      1. and enter the following settings:

        FieldValue

        Show Legend

        tick

        Horizontal Axis Title

        Calculation Date

        Label angle

        Horizontal

        Primary Axis Unit

        Day

        Primary Axis Format

        Day in month

        Secondary Axis Unit

        Month

        Secondary Axis Format

        January, February

        Vertical Axis Title

        Debt level

...


    1. Click 
      Insert excerpt
      _finish
      _finish
      nopaneltrue
      to save your changes and close the window.
    2. Go into

...

    1. Insert excerpt
      _app_mode
      _app_mode
      nopaneltrue
       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. Add a maximum value in the chart configuration to exclude this outlier and generate a more useful graph. Under Vertical Axis, set Maximum Value to 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. 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 Y-Axis starting at zero:

  1. Set the Minimum Value to 0
  2. Tick 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 Y-Axis, 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

...

  1. screen called Debt levels by payment means 2

...

  1. Now create a new view on the screen.
  2. From the screen's toolbar click
    Insert excerpt
    _tableOnly
    _tableOnly
    nopaneltrue
    .
  3. Drag the table Overall debt levels onto the

...

  1. screen.
  2. Select the view type Barchart.
  3. Drag attributes into the configuration options on in the

...

  1. view as:

    SERIESPaymentMeans
    Y ATTRIBUTESDebtLevel
    X ATTRIBUTECalculationDate


  2. Open the

...

  1. view configuration

...

    1. Update the name of the view to Debt levels by payment means 2
    2. Set the Display Type to

...

    1. Barchart
    2. Update the following settings:

      Show Legend

      tick

      Horizontal Axis Title

      Calculation Date

      Label Angle

      Sloping

      Vertical Axis Title

      Debt level


  1. Save your changes the

...

  1. view configuration form.

  2. Go into

...

  1. Insert excerpt
    _app_mode
    _app_mode
    nopaneltrue
     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

...

  1. screen called Debt totals by payment means.

...

  1. From the screen's toolbar click
    Insert excerpt
    _tableOnly
    _tableOnly
    nopaneltrue
    .
  2. Drag the table Overall debt levels onto the

...

  1. screen.
  2. Select the view type Grid.
  3. Drag the following attributes onto the

...

  1. view

...

  1. :
    • PaymentMeans
    • DebtLevel
    • Count()
  2. We want to group the results by PaymentMeans, and for each value of this, sum the DebtLevel:
    1. Open the

...

    1. view configuration form.
    2. Update the Name of the view to Debt totals by payment means
    3. Double double-click on

...

    1. DebtLevel in the View Attributes list.
    2. In the

...

    1. view attribute configuration form:
      • Set the Name to TotalDebtLevel
      • Select the

...

      • Aggregate Function: Sum
      • Press 

...

      • Insert excerpt
        _finish
        _finish
        nopaneltrue
        .
  1. Press 
    Insert excerpt
    _finish
    _finish
    nopaneltrue
     on the main view configuration form 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 - make this an aggregate attribute. Once you have added it to the view:

  • Open the

...

  • table view configuration form
  • Double click it in the View Attributes list to open the view attribute configuration form
  • Set the aggregate function to Sum
  • Save your changes

LABEL ATTRIBUTE

PaymentMeans

Show Legend

tick

Show Values on Charts

tick