# Configuring the Chart component

This topic describes how to configure the Chart component.

The power user can add a fixed Analytics statement to the Chart component, or configure a parametric Analytics statement that allows end users to see drop-down lists across the top of the chart.

Note: Unlike most components, the Chart component includes online help. This help, which mostly provides tips on working with Analytics statements, can be accessed from the same menu that contains the Preferences option. For more detailed information on the Endeca Analytics language, see the Endeca Analytics Guide.

To configure the Chart component:

1. After adding a Chart component to a page, click its .... button and then click Preferences.

   The Chart edit view appears.

2. In the Chart edit view, select from the available data sources in the drop-down list, and then click Update data source to bind your selection to the component.
3. In the Chart Options pane, set the display options for the chart:

   1. In the Chart Height and Chart Width fields, enter the display height and width of the chart in pixels.
   2. In the HTML Height and HTML Width fields, enter the height and width (in pixels) of the HTML page in which the chart will be displayed. Typically, these HTML values will be the same as the Chart values. Note that the HTML values should never be smaller than the Chart values.
   3. In the Chart Select Label field, enter a name for the control that allows end users to choose from multiple charts when available.
   4. In the Analytics Threshold field, set a threshold for the number of Analytics results the query returns.
   5. In the Analytics Threshold Exceeded Message field, enter a message to display if the query results exceed the Analytics threshold.
4. In the Chart tab, enter a title for the chart in the Chart Title field and select the type of chart from the Style drop-down menu.

5. Enter the Analytics statement on which the chart will be based, then click the Test analytics query button to test the validity of the statement (before saving preferences). Note that labels can be configured for metrics only, using the AS functionality in an Analytics statement.

6. The Metric Options, X Axis Options, and Cross tab fields are intended for parametric Analytics charts. These settings provide options for the drop-down lists your end users will access. Cross tabs are grouped aggregations such as cross-tabulated totals over one or more dimensions.

7. If you check the Enable Top-N Sort box, the chart's results can be sorted in ascending or descending order. If the Enable end user control box is also checked, the end user can toggle the sort order.

8. Click Save Preferences to save your changes.
9. After you save your preferences, the Metric Selector pane is shown. This pane allows you to specify an ORDER BY in the Analytics statement without including it in the display. In the example below, if you did not want to include the statement's ORDER BY "Avg Sales Price" metric in the chart, you would un-check that metric in the list. Note that the Metric Selector does not appear until you have tested and saved the Analytics query.

10. If you have made any other changes (such as in the Metric Selector), click Save Preferences to save these additional changes.
11. Click Return to Full Page to return to the Chart end-user view.