SQL WHERE: the fully qualified where clause of the sql query used to retrieve the data (without the WHERE keyword). Can
Adempiere Chart setup (Note: some functionality, as noted below, is incomplete/buggy in Adaxa version 1.01 and earlier) Log in to System and find the window named “Chart” The following shows the setting used to create the chart pictured below:
The first tab defines the chart.
Create a new chart with the following fields – Name: the name of chart (displayed as the chart header) Description: optional Chart Type: select for the available chart types Window height: height in pixels of the chart, the width will automatically be adjusted to fit the window Display Legend: choose whether a legend should be displayed on the chart Orientation: some chart types may be displayed in either horizontal or vertical orientation Domain Label: the label for the domain axis (x-axis of a line chart)
Range Label: the label for the range axis (y-axis of a line chart) Time Series: select this if the chart displays values over periods of time, additional fields will be displayed as follows Time Unit: the period of the chart data values (day, week, month etc) Time Scope: the number of time units that will be covered in the chart (e.g. a chart with Time Unit = Week and Time Scope = 8 will cover a period of 8 weeks) The second tab defines where the chart will get its data from. Multiple datasources can be supplied for one chart.
Name: the name of the datasource (used as the data series label if series column is not specified) Description: optional SQL FROM: the fully qualified from clause of the sql query used to retrieve the data (without the FROM keyword) SQL WHERE: the fully qualified where clause of the sql query used to retrieve the data (without the WHERE keyword). Can contain context variables enclosed with '@' symbols. Series column: (only available from Adaxa version 1.02) the optional fully qualified column name of the column that will supply the data series label for each value. If none is supplied the datasource name will be used as the data series label. For non time series charts -Category column: fully qualified sql for the column containing the data category names For time series charts (buggy prior to Adaxa 1.02, may go into infinite loop!) – Date column: fully qualified sql for the column containing the date against which values will be charted. The data will automatically be grouped by date according to the period type selected on the first tab (day, month, year, etc). Time offset: the number of periods offset from the current date for the chart to finish at. A negative time offset is in the past, positive is in the future. E.g. a chart with time units of years, a scope of 3 and an offset of 0 will display data for the preceding 3 years (including the current year).
The previous chart set up as a time series chart with the above options:
Value Column: the fully qualified sql for the column that will contain the values to be plotted in the chart. It needs to have a suitable grouping function applied (e.g. sum(), max(), avg()) as the SQL will automatically be grouped by the series and categories. Table: the primary table the source data relates to. Clicking on the chart will zoom to the associated window for this table, pre-filtered to match the selected chart item. Key Column: the key column for the source data table (must exist with the same name in both the source table and datasource view). To add the chart to a window: Go to 'Table and Column' and add a new column for the chart (can be a virtual column, the column data is ignored). Set the column reference type to chart and then select the previously defined chart from the drop down list of charts.