A chart widget graphically displays the values of one or more attributes for a feature. A bar chart can represent either the attribute values of a single field, aggregated values for multiple fields, or the total counts of features. The values can be depicted in either a horizontal bar or a vertical column. You may want to set a limit on the maximum number of features to keep the chart readable.
When you chart one field using the option to display features as bars, each bar represents the field value of a feature in the data source. For example, you are monitoring a city's snow-clearing efforts after a winter storm. There is a supply of salt available in the city for aiding in snow removal, although the salt is distributed across multiple city maintenance yards. For this situation, you could create a bar chart widget to display the amount of salt remaining at each yard. Charting the values for the salt-remaining field allows you to monitor the supplies and plan accordingly if you see that the salt is running low at a given maintenance yard.
Feature actions add display and navigation functions to individual features in the widget. If the widget's data source is a layer in a map, you can zoom the map to the feature, flash it on the map, select it on the map, or have the map follow the feature as it moves automatically.
You can use a chart widget to display multiple attribute values for a set of features using the option to display attributes as bars. In this case, a bar represents an aggregation of the values in each chosen field. In the snow removal scenario, a city supervisor wants to see a cumulative status of all the snow removal supplies, including salt, liquid calcium, and cinders. Rather than creating a separate chart for each material, you can configure the chart to show each field's value across multiple features. This allows the supervisor to understand the relative value for all the available supplies.
When displaying attribute values as bars, a summary operation is performed on the field values. The aggregate can be any one of the following:
- The average value across the features
- The maximum of the values of all the features
- The minimum of the values of all the features
- The sum total of the values of all the features
A chart widget can depict as bars the counts of features within a chosen field. You could use this when mapping snow removal materials for the city to depict the amount of each type across all maintenance yards. In an emergency management scenario, you could use a bar chart to show the counts of open incidents that require a response.
- Click Edit, and click Edit Operation View.
- To create a new widget, click Widget, click Add Widget, choose the type of widget, and click OK. To update settings for an existing widget, click Settings , and click Configure on the widget's window.
- Click the Data Source drop-down arrow, and choose the item that will provide the data for the widget.
- In the Title box, type a title that will be displayed in the widget's window.
- In the Description box, type a caption that will be displayed below the widget.
- The display type specifies what type of information you intend to display in the bar chart. Click the Display Type drop-down arrow and choose whether to display features, attribute values, or feature counts as bars.
- When displaying features as bars, click the Value Field drop-down arrow and choose an attribute field that will be charted. Set the other options as desired, including the fields used for labeling the bars, maximum number of values, and options for sorting.
- When displaying attributes as bars, in the Value Fields list, check the attribute fields whose values will be charted. In addition, you can reorder the fields to ensure they are in logical order by selecting one or more fields in the list and using the Up and Down arrows to the right of the list. Set the type of operation (sum, average, minimum, or maximum) and whether to normalize the values. When normalizing, the values in the charted fields are divided by the values in the normalization field before being included in the chart.
- When displaying feature counts as bars, click the Value Field drop-down arrow and choose an attribute field that will be charted. Set the other options as desired, including the maximum number of values and options for sorting.
- Click the Axes tab to specify the chart axis range and whether to display labels and grid lines on the axis. Choose Automatic to have the chart axis range automatically calculated based on the values in the chart. Alternatively, choose Manual to set the range to a specific value and enter the value in the Minimum and Maximum boxes.
- Click the Appearance tab to set chart display options. The chart layout can be vertical columns or horizontal bars. You can also set the color of the bars or columns or use a color ramp.
- When using a data source that represents a single feature, such as a selection in a list widget, click the Name Field drop-down arrow to set the field value that will be displayed above the widget.
- If Display Type is set to Display features as bars or Display feature counts as bars, click the Feature Actions tab to set which tools are available when interacting with features in this widget. Set which action occurs when tapping or clicking within the widget.
- When you're satisfied with the preview, click OK to finish configuring the widget.