Ad Hoc charts are a flexible, interactive way to explore your data graphically. You can choose different levels of aggregation for rows and columns, change a field from a column to a row, pivot the entire chart, hide chart values, and zoom in to see chart details.
The following sections explain how to populate, edit, and format an Ad Hoc chart. Many tasks related to working with charts are identical (or very similar) to those for tables and crosstabs. For any tasks not discussed in this section, see the information in Working with Tables.
Using Fields and Measures in Charts
You must add at least one measure to view a chart. Before any measures are added to the chart, the Ad Hoc Editor displays a placeholder with the legend displaying a single entry: Add a measure to continue. As you add measures, the editor displays the grand total of each measure in the chart.
The initial display reflects only the measures you add; it does not change when you add fields or dimensions. For example, for each measure you add to a bar chart, you see a bar with the total value of the measure, regardless of how many fields you add. This means you can add, remove, and arrange measures and fields without waiting for the display to update. Once you have the fields and measures you want, you can use the sliders on the right to select the level of detail you want. See the figure“Effect of the Slider on a Chart” for more information.
All available fields are listed in the Data Selection panel, as either standard fields or measures.
| • | Standard fields can be added to a column or a row. |
| • | Measures contain summarized values. They are typically numeric fields that determine the length of bars, size of pie slices, location of points (in line charts), and height of areas. They can be added to rows or columns, but must all be in the same target — that is, you can add one or more measures to the chart as columns, or add one or more measures to the chart as rows, but you cannot have one measure as a column and another as a row in the same chart. |
When creating a chart, keep in mind that row and column groups are arranged in hierarchies, with the highest member of the hierarchy on the left. For an Ad Hoc view based on an OLAP data source, you can change the order of distinct dimensions by dragging, but you cannot change the order of levels within a dimension. For an Ad Hoc view based on a non-OLAP data source, you can drag the field headings to rearrange the hierarchy; the highest level in a group should appear to the left; the lowest level in a group should appear to the right. For example, it doesn’t make sense to group first by postal code then by country, because each postal code belongs to only one country.
To add a field or measure to a row or column:
| 1. | In the Data Selection panel, select the field you want to add to the chart as a group. Use Ctrl-click to select multiple items. |
| 2. | Drag the selected item into the Columns or Rows box in the Layout Band. |
Setting Levels
When you add a field or dimension to a column or row, a multi-level slider located at the top of the Filters pane allows you to set the level of aggregation to use for viewing the data. The number of fields or dimensions in the row or column determines the number of levels on the slider. Measures are not reflected in the slider.
![note-icon-ns_28x28.png.f14f3355767e7a86287033d8ca79a88a.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | You cannot adjust levels on time series charts. |
The following figure shows the effect of the slider on a chart with one level of aggregation for both rows and columns.
Effect of the Slider on a Chart |
| Columns ![js-AdHoc-Charts-SliderLevel0_116x21.png.d22a7f27167a616034e8a4c2c0610388.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | Columns ![js-AdHoc-Charts-SliderLevel1_116x21.png.6b8b9ce505a398d842f66ac651ce88f8.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
Rows ![js-AdHoc-Charts-SliderLevel0_116x21.png.d6d66539cbb6e2a82a5b2196e81d8c53.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | ![js-AdHoc-Charts-Slider_224x128.png.374e143af0595a406a477d9d0afc756d.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | ![js-AdHoc-Charts-Slider-Columns_220x121.png.509c2436b3a651abb22313628d65b4f0.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
Rows ![js-AdHoc-Charts-SliderLevel1_116x21.png.419315f94732ed271777ec9efd33295d.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | ![js-AdHoc-Charts-Slider-Rows_224x128.png.f93aee9b3d79f5a8140054bf8f160780.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | ![js-AdHoc-Charts-Slider-RowsColumns_224x126.png.8920b7c752b287c60397761774f1389c.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
To recreate this view:
| 1. | Select Create > Ad Hoc View. |
| 2. | In the Select Data wizard, select foodmart data for crosstab and click OK. |
| 3. | Drag the following from the Fields panel to the Layout Band: |
| • | Store Sales from Measures to Columns. The view changes to show a column with the total. No slider is added for measures. |
| • | Product Family from Fields to Columns. The Data Level area is shown in the Filters panel, with a Columns slider added. |
| • | Date from Fields to Rows. A Rows slider is added to the Data Level area in the Filters panel. |
| 4. | Use the sliders to see how the view changes. |
The sliders help you explore your data visually in a number of ways:
| • | The slider reflects the hierarchy of the row or column groups, as determined by the order in which fields are arranged in the Layout Band. |
| • | Hovering over a setting on the slider shows the name of the field or dimension corresponding to that setting. |
| • | When you pivot a chart, slider settings are persevered and applied to the new target. For example, if you have the Row slider set to Month, the Column slider is set to Month when you pivot. See Pivoting a Chart for more information. |
| • | When you remove the currently selected level from a row or column, the slider is reset to the total; when you remove a field that is not selected, the level remains the same. When you add a field or dimension to a row or column, the number of levels of the slider changes to reflect your addition. When you change the order of the fields in a row or column, the level on the slider changes to reflect the new level of the field corresponding to the selection. |
Changing Date Grouping
If your chart includes data based on a date field, you can change the level of aggregation for the time data. To select the unit of time to chart:
| • | Right-click on the date field in the Layout Band and select Change Grouping. Then select the time period you want from the cascading submenu. The view updates to reflect the new date grouping. |
![note-icon-ns_28x28.png.9015ea15a637ad54645536453d2cb27c.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) | Time Series charts can use only day, or smaller, intervals. |
Changing the Summary Function of a Measure
You can get a new view of your data by changing the summary function of a measure, for example, from sum to average. To select a new summary function for a measure:
| • | Right-click on the measure in the Layout Band and select Change Summary Function. Then select the function you want from the cascading submenu. The view updates to reflect the new summary function. |
Pivoting a Chart
You can pivot a chart in two ways:
| • | Pivot the entire chart by clicking ![js-AdHoc-SwitchGroup.png.eb6725572a7561e533eb683eb043606a.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
Effect of Pivoting a Chart |
![js-AdHoc-Charts-Pivot1_284x273.png.299f6f3925f3dd7882f46e595a73c1ae.png](https://community.jaspersoft.com/applications/core/interface/js/spacer.png) |
| • | To pivot a single row group, right-click it and select Switch To Column Group. You can also move any field or dimension by dragging. You cannot drag a measure to a different group. |
| • | To pivot a single column group, right-click it and select Switch To Row Group. You can also move any field or dimension by dragging. You cannot drag a measure to a different group. |
Recommended Comments
There are no comments to display.