Chart

  • This component is not suitable for users that require assistive technologies. This control is not suitable for users who require assistive technologies.

In InfoSQL this control is deprecated, use the charts created using JSON instead. See Detailview for details.

Displays charts inline in grid and Info SQL.

Start value:
Return value:
Supported in: InfoSql Grid

SQL

SQL Call: Get chart (mandatory)

Gets information about a chart that should be drawn.

The chart supports all numeric and date/time data types for its value-columns, not just decimal data.

May modify database: No

Parameters

@id string
The field's value.

Resultset: Chart info

Information about the chart to draw. The value in the ChartType column determines which other columns and result sets are used.

If width and height are omitted a suitable size is picked for the chart.
Table count: repeated exactly once
Row count: exactly one row
Columns
ChartType mandatory string
Type of chart to draw.
Possible value Description
Column Column chart. Also known as vertical bar.
ColumnStacked A column chart (vertical bar) with all bars stacked.
HorizontalBar Horizontal bar chart.
HorizontalBarStacked A horizontal bar chart with all bars stacked.
Line Line chart.
Pie Pie chart.
Width optional int
Width in pixels.
Height optional int
Height in pixels.
ShowLegend optional bit
If the chart should show a legend describing its series. Default is 1.
CollectedLabel optional string
The label used for the "Other" slice. Mandatory if CollectedThreshold or CollectedThresholdPercent is specified.
CollectedThreshold optional decimal
Sets a threshold for where small values should be grouped together into a "Other" slice. Only used by pie charts.
CollectedThresholdPercent optional decimal
Sets a threshold, as a value between 1 and 99, for where small values should be grouped together into a "Other" slice. Only used by pie charts.
UseFake3d optional bit
If the chart should be drawn with a 3d-ish effect. Not used by line charts.
XLogBase optional decimal
Makes the x-axis logarithmic with the given base. Not used by pie.
XTitle optional string
The title on the x-axis. Not used by pie.
YLogBase optional decimal
Makes the y-axis logarithmic with the given base. Not used by pie.
YTitle optional string
The title on the y-axis. Not used by pie.

Resultset: Custom palette (optional)

Declares a custom palette to use for the chart's data.

The colors in the table will be used in the order they are declared.
Table count: repeated zero or one time
Row count: one or more rows
Columns
PaletteColor mandatory string
A color on the hex format "#rrggbb".

Resultset: X-axis (not used by pie) (optional)

Describes custom labels for the x-axis.

The XValue column must have the same data type as the XValue column of the chart data.

If a custom axis is specified then the chart's values must fit inside the range described by the axis.
Table count: repeated zero or one time
Row count: one or more rows
Columns
XValue mandatory decimal
Position of label.
XLabel optional string
Label.

Resultset: Y-axis (not used by pie) (optional)

Describes custom labels for the y-axis.

The YValue column must have the same data type as the YValue column of the chart data.

If a custom axis is specified then the chart's values must fit inside the range described by the axis.
Table count: repeated zero or one time
Row count: one or more rows
Columns
YValue mandatory decimal
Position of label.
YLabel optional string
Label.

Resultset: Series (not used by pie) (optional)

Declares and customizes the series in the chart.

If this table is omitted then series are derived from the SeriesName column in the chart values. If this table is present then it must declare all series used by the chart values.

If this table is omitted and the SeriesName column is omitted from the chart values then all values are treated as belonging to the same default series and no legend is shown.

Series are drawn and are listed in the legend in the order they occur in this table.
Table count: repeated zero or one time
Row count: one or more rows
Columns
SeriesName mandatory string
Name of the series. Must be unique.
Color optional string
Custom color for this series. A color on the hex format "#rrggbb".
LineType optional string
Line chart only. Type of line drawn.

Possible value Description
Line A normal line chart. Default.
Point Disconnected data points.
Range A line that uses two y-values and colors the area between them.
StepLine A step line.
MarkerType optional string
Line chart only. How data points are drawn.
Possible value Description
None Data points are not marked, only lines are drawn. Default.
Round The data points are indicated by circles.
Square The data points are indicated by squares.
ShowInLegend optional bit
If the series should be shown in the legend.
ShowValuesAsLabel optional bit
Whether the datapoints in the series should have its values diplayed as a label.
Default: Default behavior is to not include values as labels.
ValueLabelBackgroundColor optional string
The background of the datapoints labels. Only applicable if ShowValuesAsLabel is true.
Default: Default is a transparent background.

Resultset: Pie values (pie)

Pie chart values.
Table count: repeated exactly once
Row count: zero or more rows
Columns
Value mandatory decimal
Value.
Label mandatory string
Label.
Color optional string
A color on the hex format "#rrggbb". Overrides the palette.

Resultset: Bar values (columns and horizontal bar)

Columns and vertical bar chart values.
Table count: repeated exactly once
Row count: zero or more rows
Columns
XValue mandatory decimal
Value on the x-axis.
YValue mandatory decimal
Value on the y-axis.
SeriesName optional string
Name of the series the value belongs to. See the documentation for the Series table for more information.

Resultset: Line values (line)

Line chart values.
Table count: repeated exactly once
Row count: zero or more rows
Columns
XValue mandatory decimal
Value on the x-axis.
YValue mandatory decimal
Value on the y-axis.
Y2Value optional decimal
The second value on the y-axis. Mandatory for range series, not used by other series.
SeriesName optional string
Name of the series the value belongs to. See the documentation for the Series table for more information.

Default value

SQL Call: Default value

Retrieves the default value for the control.

May modify database: No

Resultset: Default value

Table count: repeated exactly once
Row count: exactly one row
Columns
<column with ordinal 1> mandatory string
The default value

Validation

SQL Call: Validation

This call is only made if there is a field validation set for the field info and the field has any content.

Live Validation

Performs field validation when the user leaves the field or one of its dependencies is changed, initial values set by default value and initial values in edit-mode are not validated.

Save Validation

When saving the validation runs server side if the field value has changed. A field value is considered changed if in new mode the value is anything other than NULL. In edit mode it is considered changed if it has a value that was not returned by the GetEditFields procedure.

May modify database: No

Parameters

@Value string
The value of the field, the procedure will not be called if value is NULL.

Resultset: Validation messages (optional)

Table count: repeated zero or one time
Row count: zero or one row
Columns
Error optional string
Error message to display. Blocks the user from saving.
Info optional string
Informative message to display. Does not block saving.
Warning optional string
Warning message to display. Does not block saving.