4.10. Using Data for Charts

4.10.1. Using Multiple Data Sources

Once you select the data source you want to use and click the Next button, the next screen will display first twenty records from the data source (With the exception of data views, which will require you to select fields and set conditions first). You can display all of the records by checking the Show All Records box.

EspressChart allows you to construct charts from multiple data sources. Once you have selected your first source, and click Next from the data table window, you will be presented with a dialog asking if you would like to process the current data or select another data source.

Additional Data Source Dialog

If you select Process Data and click the Next button, you will continue to the next step in the chart wizard. If you select Get Other Data Source, you will return to the Data Source Manager to select another data source for the chart. You can repeat this process to select as many sources as you want.

Multiple data sources are combined sideways in the data table. This means that the columns from the second (or third, fourth, etc.) data sources are placed to the right next to the columns from the first data source. If the columns from one data source have more rows than the other ones, null values will be placed in extra rows.

For example, assuming you want to use two data sources to create a chart. The data table generated by the first source will look like this:

Data From the First Data Source

The data from the second source will look like this:

Data From the Second Data Source

When you combine two data sources, you will get the following data table:

Data From Combined Sources

As you can see, the two data sources have been placed side by side. Since the second source has more rows of data than the first, additional rows of null data were added.

[Note]Note

You cannot use parameterized data sources to create a multiple data source.

4.10.2. Change Data Source

At any point during chart design, you can select to change the template’s data source. Since chart templates are saved with their data source information, you must use the option within Chart Designer to change the template's data source. Simply altering a data source in the registry will not affect the template unless you use the data source updating feature (For more information about this, see Section 4.11 - Data Source Updating). To change a template’s data source, select Modify Data Source from the Data menu, or click the Modify Data Source button on the toolbar. This will bring up the Data Source Manager allowing you to select a new data source or modify an existing one.

When changing the data source, you might need to re-map the data to the chart. For more information about layouts and data mapping, see Chapter 5 - Chart Types and Data Mapping.