SQL Statements

Chart FX Tabular Data Interpretation

Chart FX will apply default rules to construct the chart when it has been bound to a database. These rules pick the information from the result set of the query and assign legends and values to the chart according to the field type. This behavior allows the creation of a default chart that fits or closely resembles the chart you want to achieve.

The rules to construct a chart when bound to a database table are:

  • All numerical columns in the query will be plotted as different series and all string and/or date columns will be plotted as point or X-axis labels (joined by the '-' character).
  • Series Legends will be taken from the numerical field names.
  • All string and numerical fields specified in the SELECT statement will be plotted in the chart.

For example, if you have a database table containing the following fields:

and bind the chart to result set of the following SQL query:


SELECT Month,Product1,Product2 FROM Sales

The resulting chart will contain 2 series (Product1 and Product2) and X-axis labels containing the name of the months available in the Month field.

To change the default data binding behavior, Chart FX provides 2 properties (DataType and DataStyle) that allow you to change this automatic method of plotting the data values and assigning chart labels and legends.