Answer
Feature counts in map legends help users to visualize and summarize the grouping of data based on feature items listed in the legend. However, it is not possible to add feature counts to the ArcGIS Online map legend. This is as-designed in ArcGIS Online. As an alternative, use the Info Summary widget in Web AppBuilder for ArcGIS to add feature counts to feature items.
Note:
Feature counts with feature items displayed using the Info Summary widget are for viewing only. Printing the web app does not print the feature counts. Printing the web map or web app with only the feature items is possible.
• In a web map: Click Print > Print with Legend. For more information, refer to FAQ: Is it possible to print legends in a web map?
• In a web app: Add and click the Print widget, select Advanced > Include Attributes > Print.
- In ArcGIS Online, create a Web AppBuilder for ArcGIS app from the selected web map. For more information on creating a web app, refer to Web AppBuilder for ArGIS: Create your first app.
- In the web app, add the Info Summary widget.
- Click the Configure this widget (pencil) icon to open the Configure Info Summary dialog box.
- In the Configure Info Summary dialog box, click Add Layer to add the desired layer containing information summary.
- In the Options section, check the Display Feature Counts option. Click OK.
Click the Info Summary widget in the web app to display the total feature counts of the list of features. Group the individual features into feature items or groups for better visibility.
- Open the Configure Info Summary dialog box. In the Display Options column, click the Edit (pencil) icon to open the Display Settings dialog box.
- In the Display Settings dialog box, click Panel. In the Group Options section, check Group features, and select by renderer. Click OK.
Select the Info Summary widget in the web app to open a window to display the feature items with the respective feature counts. Click the drop-down arrow of each feature item to open the collapsible pane listing individual features associated with each feature item.
Note:
To display feature counts with feature items in the ArcMap map legend, open the Legend Properties dialog box, click the Items tab, and check the Show feature count option. For more information, refer to ArcMap Help: Working with legends.