Contents

 
Home
PHPRunner 7.1 manual
Prev Page Next Page
 
 

Creating web chart

 

To create new chart, click the Create Chart button on the start page and follow the steps to define chart settings.

The Back and Next buttons allow you to jump to previous and next page correspondingly. Use Jump to... button to jump to any other page. The Save button saves the chart and moves you to the web reports menu (start page). Use the SQL Query button to view resulting SQL query and query results. The Preview button allow you to see how you chart will look.

Below you can find the description of the chart creation steps:

Expand All   Collapse All

On this page you can choose a table, view or SQL query as a data source for your chart. Note that tables that are not added to the project from a database are not available for selection.

Tables from the database

· All tables added to the project are available for selection. User tables (custom views) are not available.
· When viewing a chart, all user permissions (static and dynamic permissions, advanced security option) and "view/edit" field settings do not work.
· While creating a chart you will be able to create table relations (SQL joins) to query data from two or more tables and add additional search conditions using WHERE clause.

Tables from the project

· All tables added to the project and custom views created in PHPRunner are available for selection.
· When viewing a chart, user permissions and "view/edit" field settings work as usual.
· While creating a chart you will not be able to create table relations (SQL joins) to query data from two or more tables and add additional search conditions using WHERE clause. The SQL queries defined in PHPRunner will be used to query data for the chart.
· Tables for selection are displayed as Caption (table title), e.g. Cars (carscars).

SQL queries

On the SQL queries tab a user with admin permissions can create new custom SQL query using the New query button and edit the existing SQL queries using the SQL Query button. For more information about custom SQL queries, see Custom SQL.

webcharts_tables

yellowbulbNote: this page is available if you selected a table from the database as chart data source.

On this page you can create table relations (SQL joins) to query data from two or more tables, based on a relationship between certain fields in these tables. You can add Inner Join, Left Join, Right Join and Full Outer Join.

To add an SQL join, choose tables and fields to be joined and click Add Relation. The JOIN clause will be added below the SELECT clause. You can add several table relations. Use the Remove Relation button to delete the selected table relation.

webcharts_relations

Use SQL Query button to view resulting SQL query and query results.

yellowbulbNote: this page is available if you selected a table from the database as chart data source.

On this page you can add additional search conditions using WHERE clause. To do this select a field in the first column and type search criteria in the Filter and OR... text boxes on the right. Search criterion should be added as <operator><value>. E.g. ='USA' or =2009 or <>'red' or >10.

Also you can define sort fields to sort the records in the chart. To do this select a field in the first column and choose sort type and sort order.

In addition, you can add group fields to group the results by one or more columns and apply aggregate functions like MIN, MAX, SUM, AVERAGE and COUNT. To do this select a field in the first column, select the Group By check box and choose one of values in the dropdown list box under this check box. You can filter the records that a GROUP BY clause returns using HAVING clause. To do this select a field in the first column, select one of the aggregate functions and type the condition as <operator><value> in the textbox under Having. E.g. >10 or = 500.

Example. Number of employees per city

Let's build a chart showing the number of employees per city except 'London'. We need to use WHERE clause to select employees that are not working in London, GROUP BY clause to group records by city and COUNT function to calculate the number of employees in each city.

webcharts_groupby

Use SQL Query button to view resulting SQL query and query results.

webcharts_sql1

webcharts_sql2

On this page you can select a chart type. For more information, see Chart types.

webcharts_type

On this page you can choose Data Series fields (fields with data) and label field (field with data labels).

You can add unlimited number of data series. Additional Data series dropdown list boxes are added automatically once you used available ones.

For more information about choosing data series for certain chart type, see Chart types.

webcharts_parameters

yellowbulbNote: only numeric fields can be chosen as a Data Series. Therefore only numeric fields are available for selection in Data Series dropdown list box.

The color options define the colors of the data series in the Line charts.

If we select Data Series and Label fields as shown on the image above, we receive the following chart:

webcharts_example1

On this page you can define how your chart will be displayed on the web page. The following two pictures explain how each option works (on the first picture we numbered the options; on the second one we showed how these options effect on the chart appearance).

webcharts_appearance

webcharts_appearance_example

Use the Autoupdate check box to enable chart auto-refresh by specified time interval. The Use animation check box enables the chart animation while opening a chart.

The Chart scrolling option allows you display a scrollable chart. Don't forget to define the number of bars to show on the chart screen.

Use the Logarithmic Y-Axis option to convert a linear value axis to a logarithmic value axis. If you have several data series on the chart, you can use the Multiple Y-Axes option to position each data series relative to its own Y axis.

For more information about appearance settings for certain chart type, see Chart types.

On this page you can define the chart name and title. If your project uses security, you have also an option to make a chart private. Private charts are not accessible by anyone but owner. Non-private (public) ones will appear under "shared" section on the start page.

webcharts_settings

yellowbulbNote: this page is available if you enabled dynamic permissions in PHPRunner and a chart is not marked as private on the previous step.

On this page you can assign user group permissions to view/edit/delete a chart.

webcharts_permissions

Converted from CHM to HTML with chm2web Standard 2.85 (unicode)