Skip To Content

Insert charts, tables, and metrics

Create data visualizations using charts, tables, and summary statistics. These types of visualizations are useful for displaying key statistics and trends. Initiative and site team members can create data visualizations using private and public datasets. Only people with whom the data is shared will be able to view a chart or statistic when signed in to ArcGIS Hub.

To get started, sign in to ArcGIS Hub, and click Sites on the Overview page to view a list of your sites. If your organization has a license to ArcGIS Hub premium, you can find your sites listed under Initiatives on the Overview page.

Tip:

You can also edit a site when viewing it in a browser. Be sure you're signed in to ArcGIS Hub and look for the edit button to the left of your site.

Create a table

Organize information in a table using the Text card.

Tip:

If you'd like to create a table using HTML, use code view on the text card options to insert code.

  1. Drag a Text card onto an existing row.
  2. Hover over the card and click the settings button to switch to edit mode.
  3. Click the table option.
  4. Select the number of cells you want per row and column.
  5. Once you've selected the size of your table, click to insert the table. Add or remove rows or columns by clicking inside a cell and choosing the insert or delete rows or columns buttons. Click the delete button to remove the table entirely.

    Tip:

    To add a header, click the top row of your table and click the Toggle table header button. Headers make it easier for those who use assistive technologies to navigate a table's content.

  6. Click Save.

Display key metrics

Use summary statistics to provide data at a glance for key performance indicators and more. Summary statistics are generated from a dataset query and are automatically updated as the dataset is updated. Only those who have access will be able to use summary statistics upon sign in that have been generated using internally shared data.

  1. Drag a Summary Statistic card onto an existing row.
  2. Hover over the card and click the settings button to switch to edit mode.
  3. Click Add Data, which opens an item picker to find the data service of your choice. When editing the site, the source link below your statistic will link to the item details page for the dataset's preview page.
  4. For Statistic Field, choose a field from the selected service. This field will be used in subsequent steps.
  5. For Statistic Type, choose the type of operation to perform on the selected field.
    • For text and date fields, choose between count, minimum, and maximum.
    • For number fields, choose between count, sum, minimum, maximum, average standard deviation, and variance.
  6. Optionally add a filter to your statistic:
    1. Select an attribute to use for your filter.
    2. Click Add.
    3. Select the new attribute box to show the filter input. The input box will vary depending on the field type.
    4. Enter your desired filter.
    5. Click outside the filter box or press Enter.
  7. Enter a title in the Title text box.
  8. Optionally enter text for Trailing Text to provide detail for the statistic, and change the Accent Color setting for the statistic itself.
  9. Click Save.

Bar charts

  1. Drag a Chart card onto an existing row.
  2. Hover over the card and click the settings button to switch to edit mode.
  3. Bar Chart will be selected by default.
  4. Click Add Data.
  5. Select an item from your available data services.
  6. For Choose Category Attribute, choose the primary charting item from your data.

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  7. Optionally, from Choose Value Attribute, choose a numeric field to serve as a value metric for your category attribute. Once selected, the default statistical operation on this field is Sum. You can change the Statistical Operation setting by using the drop-down menu to the right of the Choose Value Attribute selector. The value attribute supports Min, Max, Sum, Average, and Count. By selecting Count, the value attribute is deselected (because there is no need for an additional field to count the category attribute).

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  8. Click the Options menu to customize the display of your chart with the following settings:
    • The Sort option enables you to choose how your attribute data is displayed. Select an attribute and click the sort button next to the attribute to display data in ascending or descending order.
    • Set a height value (pixels) for your chart in the Height (px) text field.
    • Choose to display a title for your chart by clicking the toggle button next to Chart Title. If displaying a title, enter its name in the provided text field and choose an alignment.
    • Set Primary Chart Color by entering a color code, or click the color picker to choose a color.
    • Provide text for the Category Label and Value Label fields.
  9. Click Save.

Pie charts

  1. Drag a Chart card onto an existing row.
  2. Hover over the card and click the settings button to switch to edit mode.
  3. Select the pie chart by clicking the circular pie chart button.
  4. Click Add Data.
  5. Select an item from your available data services.
  6. For Choose Category Attribute, choose the primary charting item from your data.

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  7. Optionally, from Choose Value Attribute, choose a numeric field to serve as a value metric for your category attribute. Once selected, the default statistical operation on this field is Sum. You can change the Statistical Operation setting by clicking the drop-down arrow to the right of the Choose Value Attribute selector. The value attribute supports Min, Max, Sum, Average, and Count. By selecting Count, the value attribute is deselected (because there is no need for an additional field to count the category attribute).

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  8. Click the Options menu to customize the display of your chart with the following settings:
    • The Sort option enables you to choose how your attribute data is displayed. Select an attribute and click the sort button next to the attribute to display data in ascending or descending order.
    • Set a height value (pixels) for your chart in the Height (px) text field.
    • Choose to display a title for your chart by clicking the toggle button next to Chart Title. If displaying a title, enter its name in the provided text field and choose an alignment.
    • Set Category Label text for the label of each pie wedge in the tooltip and Value Label text for the label of the metric in the tooltip.
  9. Click Save.

Line charts

  1. Drag a Chart card onto an existing row.
  2. Hover over the card and click the settings button to switch to edit mode.
  3. Select the line chart by clicking the line chart button.
  4. Click Add Data.
  5. Select an item from your available data services.
  6. For Choose Category Attribute, choose the primary charting item from your data.

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  7. Optionally, from Choose Value Attribute, choose a numeric field to serve as a value metric for your category attribute. Once selected, the default statistical operation on this field is Sum. You can change the Statistical Operation setting by clicking the drop-down arrow to the right of the Choose Value Attribute selector. The value attribute supports Min, Max, Sum, Average, and Count. By selecting Count, the value attribute is deselected (because there is no need for an additional field to count the category attribute).

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  8. Click the Options menu to customize the display of your chart with the following settings:
    • The Sort option enables you to choose how your attribute data is displayed. Select an attribute and click the sort button next to the attribute to display data in ascending or descending order.
    • Set a height value (pixels) for your chart in the Height (px) text field.
    • Choose to display a title for your chart by clicking the toggle button next to Chart Title. If displaying a title, enter its name in the provided text field and choose an alignment.
    • Set Primary Chart Color by entering a color code, or click the color picker to choose a color.
    • Set Category Label text for the label of each point in the tooltip and Value Label text for the label of the metric in the tooltip.
  9. Click Save.

Scatterplots

  1. Drag a Chart card onto an existing row.
  2. Hover over the card and click the settings button to switch to edit mode.
  3. Select the line chart by clicking the scatterplot button.
  4. Click Add Data.
  5. Select an item from your available data services.
  6. For Choose X Axis Attribute, choose the primary charting item from your data.

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  7. Select an attribute for the Choose Y Axis Attribute field. Choose a numeric field to serve as a value metric for your category attribute.

    Numeric and string fields can be used in charts. By default, when you select a category attribute, the resulting chart will be a count of this attribute.

  8. Click the Options menu to customize the display of your chart with the following settings:
    • The Sort option enables you to choose how your attribute data is displayed. Select an attribute and click the sort button next to the attribute to display data in ascending or descending order.
    • Set a height value (pixels) for your chart in the Height (px) text field.
    • Choose to display a title for your chart by clicking the toggle button next to Chart Title. If displaying a title, enter its name in the provided text field and choose an alignment.
    • Set Primary Chart Color by entering a color code, or click the color picker to choose a color.
    • Set labels for X Axis Label and Y Axis Label to display on your chart.
  9. Click Save.

JSON charts

Custom charts are created from JSON using a specific chart specification.

  1. Drag a Chart card onto an existing row.
  2. Hover over the card and click the settings button to switch to edit mode.
  3. Select the JSON tile.
  4. Enter your JSON in the JSON Chart Specification field.
  5. Optionally, in the Options section, you can enable or disable and customize the Chart Title and Height (in pixels) settings.
  6. Click Save.

Datasets

The datasets array specifies an ArcGIS feature service URL and query parameters. Refer to the REST API documentation to learn more about query parameters.

{ "datasets": [ { "url": "SampleArcGISFeatureService_URL", "name" : "Number_of_SUM",
"query": { "groupByFieldsForStatistics": "Zip", "outStatistics": [{
"statisticType": "sum", "onStatisticField": "Number_of",
"outStatisticFieldName": "Number_of_SUM" }] } } ]
}

Series

The series array allows you to specify the mappings between fields in the service response and the visual aspects of the chart (x,y axes, color and size for scatterplot charts, and radius for pie charts).

{ "series": [ { "source": "Number_of_SUM", "category": { "field": "Type", "label": "Facility
Use" }, "value": { "field":"Number_of_SUM","label":"Total Students" }} ] }

Overrides

The override property allows you to specify visual overrides, such as color or positioning, for the entire chart.

"overrides": {
      "legend": {
          "enabled": true
      },
      "backgroundColor": "#E6E6FA",
      "backgroundAlpha": 1
  }
}

Specifications

The specification property allows you to input an entire Cedar specification for a purely custom chart. View examples for existing chart specifications.

Box chart example

{
  "type": "bar",
  "datasets": [
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Number_of_SUM",
      "query": {
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [
          {
            "statisticType": "sum",
            "onStatisticField": "Number_of",
            "outStatisticFieldName": "Number_of_SUM"
          }
        ]
      }
    }
  ],
  "series": [
    {
      "category": {"field": "Type", "label": "Type"},
      "value": {"field": "Number_of_SUM", "label": "Number of Students"},
      "source": "Number_of_SUM"
    }
  ]
}

Horizontal bar chart example

{
  "type": "bar-horizontal",
  "datasets": [
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Number_of_SUM",
      "query": {
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [
          {
            "statisticType": "sum",
            "onStatisticField": "Number_of",
            "outStatisticFieldName": "Number_of_SUM"
          }
        ]
      }
    }
  ],
  "series": [
    {
      "category": {"field": "Type", "label": "Type"},
      "value": {"field": "Number_of_SUM", "label": "Number of Students"},
      "source": "Number_of_SUM"
    }
  ],
  "overrides": {
    "categoryAxis": {
      "labelRotation": -45
    }
  }
}

Grouped bar chart example

Note:
Each series will match to a group.
{
  "type": "bar",
  "datasets": [
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Jordan",
      "query": {
        "where": "City='Jordan'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Dewitt",
      "query": {
        "where": "City='Dewitt'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Fayetteville",
      "query": {
        "where": "City='Fayetteville'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    }
  ],
  "series": [
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Jordan Students"},
      "source": "Jordan"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Dewitt Students"},
      "source": "Dewitt"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Fayetteville Students"},
      "source": "Fayetteville"
    }
  ]
}

Scatterplot chart example

{
  "type": "bar",
  "datasets": [
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Jordan",
      "query": {
        "where": "City='Jordan'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Dewitt",
      "query": {
        "where": "City='Dewitt'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Fayetteville",
      "query": {
        "where": "City='Fayetteville'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    }
  ],
  "series": [
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Jordan Students"},
      "source": "Jordan"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Dewitt Students"},
      "source": "Dewitt"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Fayetteville Students"},
      "source": "Fayetteville"
    }
  ]
}

Bubble scatterplot example

{
  "type": "bar",
  "datasets": [
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Jordan",
      "query": {
        "where": "City='Jordan'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Dewitt",
      "query": {
        "where": "City='Dewitt'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Fayetteville",
      "query": {
        "where": "City='Fayetteville'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    }
  ],
  "series": [
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Jordan Students"},
      "source": "Jordan"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Dewitt Students"},
      "source": "Dewitt"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Fayetteville Students"},
      "source": "Fayetteville"
    }
  ]
}

Timeline chart example

Note:
Category must be a datetime field.

{
  "type": "bar",
  "datasets": [
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Jordan",
      "query": {
        "where": "City='Jordan'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Dewitt",
      "query": {
        "where": "City='Dewitt'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    },
    {
      "url": "https://services.arcgis.com/uDTUpUPbk8X8mXwl/arcgis/rest/services/Public_Schools_in_Onondaga_County/FeatureServer/0",
      "name": "Fayetteville",
      "query": {
        "where": "City='Fayetteville'",
        "orderByFields": "Number_of_SUM DESC",
        "groupByFieldsForStatistics": "Type",
        "outStatistics": [{
          "statisticType": "sum",
          "onStatisticField": "Number_of",
          "outStatisticFieldName": "Number_of_SUM"
        }]
      },
      "join": "Type"
    }
  ],
  "series": [
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Jordan Students"},
      "source": "Jordan"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Dewitt Students"},
      "source": "Dewitt"
    },
    {
      "category": {"field": "Type", "label": "Type"},
      "value": { "field": "Number_of_SUM", "label": "Fayetteville Students"},
      "source": "Fayetteville"
    }
  ]
}