Versions Compared

Key

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

Insert excerpt
_Banners
_Banners
nameanalysisscreen
nopaneltrue

This page is for data modellers who want to display data on a screen in a pie chart.

Overview

PhixFlow can display any Table data as a pie chart on GUI screens. This page will show you how to add data as a pie chart to any screen. It will go through a worked example of creating a pie chart of companies and their various industriesindustry sectors.

Table of Contents

Creating a Company Industry Pie Chart

Once you have a screen it is simple to add any data to it. To add data

Info

The data used on this page is available from the PhixFlow Learning Centre.

Creating a Pie Chart

To add a Pie Chart:

  1. Click 
    Insert excerpt
    _table_list
    _table_list
    nopaneltrue
     
  2. Drag and drop the desired table onto the screen. In this instance, the Contacts table is dragged onto a the screen.
  3. PhixFlow then asks how to display the data using:
  4. Click Pie Chart. 
  5. The attribute picker should will then appear. Drag Industry to Label Attribute and Count() to Data Attribute. This is counting the number of companies per industry.

Image RemovedImage Added

Relational attributes

For more information on adding relational attributes, see Creating a Grid.

Filtering

The data in displayed on the pie chart can be filtered in the following ways

Filter
Location
Link
Reason to use
Default FilterView EditorFilter

Default filters can be cleared by the user on the front end. Use a default filter when users are allowed to remove the filter to view all the data. If a default filter has been applied pie charts are marked with Image Removed. Clicking on this icon and selecting Clear Applied Filter will remove the default filter.

E.g. A pie chart displaying a list of companies has an Active boolean attribute. The default filter only displays active companies, but a user can clear this filter at any time to view all companies.

Background FilterView EditorFilter

Background filters cannot be cleared by the user on the front end. Use a background filter to always filter any instance of the view by the parameters provided. 

Views can be reused by multiple data components. Using a background filter will filter all components which are backed by this view.

Background Filter RulesGrid Component EditorFilter Rule

Background filter rules cannot be cleared by the user on the front end. They appear on the data component instead of the backing view so only applies to that component. Rules can be added to each filter to only apply in certain contexts. 

E.g. A button is clicked to show the data for a selected number of companies. The background filter only applies when companies are selected in another view using the expression 

Code Block
countElements(CompanyList) > 0

Styles and formatting

Pie charts can be formatted on the backing view:

This page is for data modellers who want to display data on a screen in a grid.

Overview

PhixFlow can display any Table data as a grid on GUI screens. This page will show you how to add data as a grid to any screen. It will go through a worked example of creating a grid of employees from various companies.

Creating an Employees Grid

Once you have a screen created it is simple to add any data to it. To add data:

  1. Click Image Removed List Tables 
  2. Drag and drop the desired table onto the screen. In this instance, the Employees table is dragged onto a screen.
  3. PhixFlow then asks how to display the data using:Image Removed
  4. Click Grid 
  5. The attribute picker should then appear. Drag and drop the attributes to display directly onto the grid.

Image Removed

Relational Attributes

The Employees table has a relationship with a Company table. See the below ERD.

Image Removed
Each employee has a company ID associated to it and is stored in a foreign key attribute, Company. This attribute is linked to the primary key (id_1) of the Companies table. The Companies table also has a display name attribute (CompanyName). This is the attribute that is displayed on the front end when adding a foreign key to any data bound component. For more information on ERD diagrams and relational views, see Entity Relationship Diagrams.

Adding foreign key attributes

Image Removed

When a foreign key, e.g. Company, is added to the grid PhixFlow does the following automatically

  • adds the foreign key (Company) from the primary table (Employees),
  • adds the display name attribute (CompanyName) from the related table (Companies).
    This attribute is marked with Image Removed,
  • hides the foreign key.

Adding relational attributes from a many:1 relationship Image Removed

On the above grid the user also wants to display the companies address on the same grid. This data is stored on the Company table and can be accessed using the relationship. To add the company address

  1. Right click on the grid and click Show attributes for 'Employees'
  2. Click the related table Companies(Company)
  3. Drag and drop the attribute Address onto the grid. 
    This attribute is marked with Image Removed

Image Removed

Adding relational attributes from a 1:many relationship Image Removed

The user creates another screen to display the company data and wants to display the number of employees for that company using their 1:many relationship. Using an attribute from a 1:many relationship causes aggregation of the data. The most simple case is to use the count() attribute. To add a relational attribute from a 1:many relationship

  1. Right click on the grid and click Show attributes for 'Companies'
  2. Click the related table Employees(Company)
  3. Drag and drop the attribute Count() onto the grid. 
    This attribute is marked with Image Removed. It is counting all the records on the Employees table which have that company as its foreign key value.
  4. Rename the attribute using the label to Number of Employees

todo- redo GIF when Count() is available

Image Removed

Adding any other attribute on the table will also cause aggregation. A default aggregate function is added to the attribute added. PhixFlow defaults this to the following:

Data Type
Default Aggregation
String/Bigstring

Count

Integer/Float/DecimalSumDate/DateTimeMaxTrueFalseMax

Making grids editable

Marking columns as editable

By default all grid attributes are read only. Grids can be made editable by

  1. Click on the attribute column header to open its property editor
  2. Open Grid Settings
  3. Untick Read Only

    Strings, Bigstrings, Integers, Floats and Decimals allow users to type to change its value

    Dates and Datetimes have a date picker to change its value

    Display name attributes will automatically appear as a drop down. Selecting a different value, e.g. Company, will automatically update the ID stored in the foreign key attribute

Saving data

Users can then click any value to edit it. To save changes to editable attributes

  1. Right click on a grid and Show the view configuration
  2. Open Advanced
  3. Tick Auto Save
    This will automatically save any changes made to the grid. An action can be added as a save action below this field if required.

Drop downs

Any attribute can have a drop down added for a user to select a value. See View Attribute

Filtering and Sorting

The data in the grid can be automatically sorted by adding a default sort order on the backing view. For more information on sort orders see Sort Order.

The default sort order can be overwritten at any time by a user by right clicking on a column header and clicking Sort Ascending or Sort Descending

Image Removed

The data in displayed on the grid can be filtered in the following ways

Filter
Location
Link
Reason to use
Default FilterView EditorFilter

Default filters can be cleared by the user on the front end. Use a default filter when users are allowed to remove the filter to view all the data. If a default filter has been applied grids are marked with Image Removed. Clicking on this icon and selecting Clear Applied Filter will remove the default filter.

E.g. A grid displaying a list of employees has an Active boolean attribute. The default filter only displays active employees, but a user can clear this filter at any time to view all employees.

Background FilterView EditorFilter

Background filters cannot be cleared by the user on the front end. Use a background filter to always filter any instance of the view by the parameters provided. 

Views can be reused by multiple data components. Using a background filter will filter all components which are backed by this view.

Background Filter RulesGrid Component EditorFilter Rule

Background filter rules cannot be cleared by the user on the front end. They appear on the data component instead of the backing view so only applies to that component. Rules can be added to each filter to only apply in certain contexts. 

E.g. A button is clicked to show all employees for company X. This sets a hidden attribute to true. The background filter only applies when this hidden attribute is marked as true.

Column Filter PickersGrid Column Headers

Filters on Data Views

Controlled exclusively by the user on the front end. Users can select any attribute on a grid and filter using expressions and by selecting values.

Image Removed

Styles and Formatting

Pie charts can be styled and formatting on the backing view. For more information see View.

Style
Location
Description and use cases
Change pie chart colours using Colour Map

Backing View > Chart Layout 

Can be used to assign colours to particular values.

See Colour MapChange Number FormatsBacking View > Chart Layout
  • Change the number format for the data attribute under Values Number Format
  • Change the number format for the tooltip under Tooltip Number Format
Change Chart Styles

Backing View > Styles Tab Image Removed

Can be used to provide general styles to a pie chart

  • Grid Header Style
  • Grid Header Button Style
  • Grid Header Icon Style
  • Grid Header Dropdown Button Style
  • Grid Header Dropdown Pane Style
Change legend position/visibilityBacking View > Chart Layout
  • Hide legend by unticking Show Legend
  • Move legend by ticking Show Legend Below the Chart
  • Hide numbers on the chart by unticking Show Values on Charts

Adding Actions

Actions can be added to grids in three locations

  • as a double-click action for the whole chart
  • as a double-click action against an attribute  I dont think this should be an option
  • as a drop target. See Drag Types and Drop Targets

To add an action as a double-click action

  1. Right click on a grid to Show the View Configuration
  2. Open the Actions tab
  3. On Double Click Action select either Table Action or Actionflow as an action type
  4. Select or create the appropriate action. See Configuring Actions.

Image Removed

Remove section 

To add an action against an attribute

  1. Right click on a grid to Show the View Configuration
  2. Double-click on the view attribute to add an action to
  3. On Double Click Action select either Table Action or Actionflow as an action type.
  4. Select or create the appropriate action. See Configuring Actions.
  5. Optionally set the following
Option
Description
Always Show Action Icon

Image Removed Tick  to always display the action icon in read-only grid cells. The user can click anywhere in the cell to run the action.

Image Removed Untick to only display the action when the cell is in focus.

Hide the Input Field

Image Removed Tick to hide the input field and to display the action icon in the column.

Image Removed Untick to display the input field in the column.

Hide the Action Icon

Image Removed Tick to hide the action icon. The user can run the action by clicking anywhere in the cell. Do not tick this option for editable columns.

Image Removed Untick to display the action icon in the column.

Action Icon Style
The style applied to the action icon. If no style is set, PhixFlow uses a default cog icon Image Removed.

Image Removed

To add an action to drop target

  1. Right click on a grid to Show the View Configuration
  2. Open the Actions tab
  3. Open Drop Targets and click Image Removed Add New
  4. Provide a Name
  5. Select the appropriate Drag Type. If unfamiliar, see Drag Types and Drop Targets
  6. On Drop Action select either Table Action or Actionflow as an action type.
  7. Select or create the appropriate action. See Configuring Actions.

Image Removed

Properties

For the view properties see 

More Information