6.6.1  Binding a Chart to a Data Source

After you have added a new chart element to the report (see Adding a Chart Element), follow the steps below to bind the chart to a data source:

1. Click on the chart to select it. This opens the Data Source panel and the Binding panel.

2. Drag a field from the desired query or data model in the Data Source panel onto the 'X' field in the Binding panel.

 

This field provides the chart's X-axis data, and the field name is automatically used as the axis label. The X-axis field should generally be configured as a dimension. See Editing Dimensions and Measures for more information.

Ranking requires a measure to be defined (next step). To rank a dimension based on a measure that is not displayed in the chart, see Adding a Non-Displaying Measure to a Chart.

3. Click the 'Edit Dimension' button, and select the desired ordering and ranking for the X-axis data.

 

Tip: You can drag a measure field from the Data Source panel directly onto the Viewsheet grid to cre­ate a Range Slider component that filters the chart data.

4. Drag a field from the desired query or data model in the Data Source panel onto the 'Y' field in the Binding panel.

 

This field provides the Chart's Y-axis data, and the field name is automatically used as the axis label. The Y-axis field should generally be configured as a measure. See Editing Dimensions and Measures for more information.

5. Click the 'Edit Measure' button, and select the desired aggregation method for the Y-axis data.

 

6. For a line-type chart or map-type chart (see Setting the Chart Style), optionally drag a field to the 'P' region. The values in this path field are used to assign the sort order for the plotted data. Connecting lines are drawn between points which are adjacent in the path sort order, rather than between points which are adjacent on the axis.

See the next sections for information about changing other aspects of the chart, including visual properties, labeling, and sub-series.

Example: Chart Data Binding  >>

In this example, you will create a chart that displays Sales vs. State.

1. Create a new blank tabular report. (See Creating a Blank Report Template.)

2. Add a text element at the top of the report. Set the text to “Total Sales by State”. Center the text, and make the font Bold 14-point. This will be the chart title.

3. Click the 'Chart' button to add a blank chart to the report.

4. Click on the chart to select it. This opens the Data Source panel and the Binding panel.

5. Under the Data Source tab, expand the 'Orders' data source, and expand the 'sales by state' query.

6. Drag the 'State' field from the 'sales by state' query onto the 'X' field in the Binding panel.

7. Drag the 'Sales' field from the 'sales by state' query onto the 'Y' field in the Binding panel.

 

8. Click the 'Edit Dimension' button next to the 'State' field.

9. From the 'Ranking' menu, select 'Top', enter “2” for the number of groups, and select 'Sum(Sales)' for the aggregate.

 

This specifies that the chart should display only the top two state records, according to their sales.

10. Click the 'Apply' button (green arrow).

11. Click the 'Preview' button in the Style Studio toolbar to view the report.

 

 

See Also

Text Element, for more information about text properties.

Binding a Chart to Geographical Data (Map), for instructions on representing geographic data.

Editing Dimensions and Measures, for more information on ranking and ordering.

X-Axis Label Property, Y-Axis Label Property, to modify chart labels.

Adding a Sub-Series, for information on using the 'Visual' panel.

<< 6.6 Binding Data to a Chart Element © 1996-2013 InetSoft Technology Corporation (v11.5) 6.6.2 Working with Multiple Measures and Subseries >>