Chart Enhancement
The Chart Enhancement function operates on an existing chart to adjust some of its components like data labels and axes to make the chart more user-friendly. For example, an XY scatter chart configured over a day showing timestamps can leave a gap on the left and right. Using this function, the X-axis can be adjusted to span only the day with nothing extra.
If the data series of the chart need to be adjusted for the amount of data to show, use the Chart Range function under the Worksheet category.
Settings | |
|---|---|
Chart Name | The name of the chart to apply the function to. The browse button (…) opens a list of every configured chart within the workbook to select from. The list is in the format: Chart Name – Sheet!Range of the chart If a chart is selected in the list, the worksheet for the chart is activated and the range of the chart is selected to highlight the chart itself. The chart name is not visible and is typically not set by the user. When a chart is inserted into a worksheet it is given a default name (Chart X where X is a number that starts at 1). However, if the worksheet is copied to another sheet, if the default name is left it can be changed on the new worksheet. To combat this, charts in the template are renamed to a fixed name (xlrX where X is a number that starts at 1) so that chart names are consistent between worksheets. Note that only charts configured to worksheets are listed. Charts configured on a Chart Sheet cannot be used with this function. |
Adjust Labels | For each series of the chart, data labels may be turned on, so the value of each point is labeled. However, if the values are textual, the labels show as 0. If you wish to show the textual values for each point, set this to either In-line or Alternate.
|
Anchor Plot Area | If rows or columns are inserted into the report worksheet that causes the chart to expand, it can leave whitespace at the top or left of the chart because the plot area is moved down or to the right. This setting can correct this and anchor the plot area to the Left, to the Top or Both. This eliminates that useless whitespace from the chart. |
Adjust X-Axis | This setting determines if the X-axis of the chart should be adjusted by updating the minimum and maximum values of the axis. Note that is only valid on charts like XY Scatter where the X-axis is defined with minimum and maximum values. First Series means that the minimum and maximum values are derived from the values in the first series of the chart. If the values are numeric, the minimum is reduced by 1% and the maximum is increased by 1% before they are applied to the chart. Custom means that the minimum and maximum values are derived as the minimum and maximum values from the cell range specified in the Custom Scaling setting. |
Custom Scaling | If Adjust X-Axis is set to Custom, this defines the range of cells where the minimum and maximum values are derived for the X-axis. |
Axis Ticks | This setting can be used to fix a number of tick marks for the X and or Y axis. The format of the setting is X,Y e.g., 5,7 for 5 X axis tick marks and 7 Y axis tick marks. If either is set to 0, the tick marks for the axis remain unchanged. |
Adjust Y-Axis | This setting determines if the Y-axis of the chart should be adjusted by updating the minimum and maximum values of the axis. First Series means that the minimum and maximum values are derived from the values in the first series of the chart. If the values are numeric, the minimum is reduced by 1% and the maximum is increased by 1% before they are applied to the chart. Custommeans that the minimum and maximum values are derived as the minimum and maximum values from the cell range specified in the Custom Scaling setting. |
Custom Scaling | If Adjust Y-Axis is set to Custom, this defines the range of cells where the minimum and maximum values are derived for the Y-axis. Note that the range specified here do not need to be the same ones used in the data series of the chart. |
Example
A daily report template is configured containing an XY scatter chart to graphically display the daily data. The X axis is configured for the timestamps returned from the group. By default, there is a gap on the left and right of the chart because the X-axis is more than 1 day.
The Chart Enhancement function can correct this. Assuming the chart is named xlr1, the settings are:
Setting | Value |
|---|---|
Chart Name | xlr1 |
Adjust Labels | No |
Anchor Plot Area | None |
Adjust X-Axis | First Series |
Custom Scaling | |
Axis Ticks | 0,0 |
Adjust Y-Axis | No |
Custom Scaling |