Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
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 industry sectors.
Table of Contents |
---|
Creating
aa Pie Chart
Once you have a screen it is simple to add any data to it. To add a Pie Chart:
- Click
Insert excerpt _table_list _table_list nopanel true - Drag and drop the desired table onto the screen. In this instance, the Contacts table is dragged onto the screen.
- PhixFlow then asks how to display the data using:
- Click Pie Chart.
- The attribute picker will then appear. Drag Industry to Label Attribute and Count() to Data Attribute. This is counting the number of companies per industry.
Relational attributes
For more information on adding relational attributes, see Creating a Grid.
Filtering - Potentially add this to its own page and reference it here and in the grid page
The data in displayed on the pie chart can be filtered in the following ways
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 . 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 user can clear this filter at any time to view all companies.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 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 expressionCode Block |
---|
countElements(CompanyList) > 0 |
Styles and Formatting - As above to avoid repetition.
Pie charts can be styled and formatted on the backing view. For more information see View. We may wish to make reference to colour maps here also.
Backing View > Chart Layout
Can be used to assign colours to particular values.
- Change the number format for the data attribute under Values Number Format
- Change the number format for the tooltip under Tooltip Number Format
Backing View > Styles Tab
- Grid Header Style
- Grid Header Button Style
- Grid Header Icon Style
- Grid Header Dropdown Button Style
- Grid Header Dropdown Pane Style
- 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
- Right click on a grid to Show the View Configuration
- Open the Actions tab
- On Double Click Action select either Table Action or Actionflow as an action type
- Select or create the appropriate action. See Configuring Actions.
Remove section
To add an action against an attribute
- Right click on a grid to Show the View Configuration
- Double-click on the view attribute to add an action to
- On Double Click Action select either Table Action or Actionflow as an action type.
- Select or create the appropriate action. See Configuring Actions.
- Optionally set the following
Tick to always display the action icon in read-only grid cells. The user can click anywhere in the cell to run the action.
Untick to only display the action when the cell is in focus.
Tick to hide the input field and to display the action icon in the column.
Untick to display the input field in the column.
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.
Untick to display the action icon in the column.
To add an action to drop target
- Right click on a grid to Show the View Configuration
- Open the Actions tab
- Open Drop Targets and click Add New
- Provide a Name
- Select the appropriate Drag Type. If unfamiliar, see Drag Types and Drop Targets
- On Drop Action select either Table Action or Actionflow as an action type.
- Select or create the appropriate action. See Configuring Actions.
More Information
For a complete list of view properties and their functions see View.