Component: Chart (legacy)

 Show all Hide all

Chart component.

Component mode: Store in database

Stores the generated chart in the database.

Supported modes: Store in database | Display chart inline | Attachment

File mode: Download

The user downloads the file.
Supported modes: Download | Save | Save and download | Component

SQL

SQL Call: Chart details (mandatory)

Sql call made to extract chart-details.
Supports custom errors: No
May modify database: No

Parameters:

@init mandatory bit
Set to '1' when the component asks for chart-details.

Resultset: Chart details

Resultset with chart-details
Repeat mode: repeated exactly once
Row count: exactly one row

Columns:

Width optional int
Width of the resulting image.
Native width is 500px.
Height optional int
Height of the resulting image.
Native height is 320px.
MaxNo optional int
Maximum number of groups. If more rows are returned the remaining rows are grouped together.
Unit optional string
Only used with chart type 'bar'. Label for y-axis.
OtherLabel optional string
When several rows are grouped together this is used as label.

Use only in combination with maxno.
Markers optional bit
Only used with chart type 'line'. Draws markers at the datapoints.

SQL Call: Chart data (mandatory)

Sql call made to extract chart-data
Supports custom errors: No
May modify database: No

Resultset: Chart data

Resultset with chart-data.
Repeat mode: repeated exactly once
Row count: zero or more rows

Columns:

label mandatory string
Datalabel
val mandatory decimal
Y-value
xval optional decimal
For line charts: X-values. Use this if the data is not equidistant. The lowest x-value will always be displayed just right of the y-axis, and the highest x-value will be displayed right most in the chart.
color optional string
When choosing a specific color. Use the format "#xxxxxx".
serie optional string
Only for line charts: Name of the data series. Use this to provide multiple series.
PositiveDeviation optional decimal
Only for line charts: Defines the deviation/width of the line in the positive Y-direction. Only use in combination with NegativeDeviation.
NegativeDeviation optional decimal
Only for line charts: Defines the deviation/width of the line in the negative Y-direction. Only use in combination with PositiveDeviation.

Resultset: Labels

This resultset may be used for line charts to override the labels specified in the first resultset.
Repeat mode: repeated zero or one time
Row count: zero or more rows

Columns:

label mandatory string
Datalabel
xval mandatory decimal
X-value

SQL Call: Validate parameters

Allows you to validate the parameters supplied by the user before any other SQL is run in the component. This call is only made if the component has visible parameters, the SQL is a stored procedure, and 'Validate parameters' is checked.
Supports custom errors: No
May modify database: No

Parameters:

@force optional bit
@validateparams mandatory bit
This parameter is set to 1 by Softadmin® when this call is made.

Custom access control and logging

SQL Call: Custom access control and logging

Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.

Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.

The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.

If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.
Supports custom errors: No
May modify database: Yes

Resultset: Access permissions

Return whether the user is allowed to visit the menu item with the current parameters.
Repeat mode: repeated exactly once
Row count: exactly one row

Columns:

GrantAccess mandatory bit
1 if the user is allowed to view the menu item, 0 if the user should not be allowed to view the menu item.

If 0 then an error will be logged as the user should not have been able to reach the menu item with the given parameters in the first place.