Skip to main content
Sumo Logic

Area Charts

An area chart is used to visually represent quantity over a period of time. The quantity is laid out on the vertical axis, and the horizontal axis shows the time period being charted. What distinguishes an area chart from a line chart is the use of shaded regions below the line which better indicates the increase or decrease of volume.

To create an area chart, you must use a query that provides more than one data point in the Aggregates tab. Then the line is drawn between the data points to show the change.

For example, you could use the following query to create an area chart:

error | timeslice 1m | count by _timeslice

which would produce results such as:


Create an area chart

To add a panel with an area chart:

  1. Create or open a Dashboard (New) and click on Add Panel > Time Series or Add Panel > Categorical. See Panel Types for details on what to choose.
    time series or categorical.png
  2. Provide a Metric or Log query and press Enter for it to run.

    You can create Log and Metric queries on the same panel.

    Log query

    Enter your aggregate search query in the input field and press enter. A few important things to note are:

    • Only search results that have been aggregated using a group or aggregate operator can be charted. See Group or Aggregate Operators for a list. 
    • By default, the query builder is set to Logs
    • Joining log queries in a separate query is not supported.

    Add log query.png

    Metrics query

    Click the left-most dropdown option and select Metrics. You should be familiar with the basics of creating metrics queries and alerts to ensure successful results. By default, the query builder is set to Logs.

    Metrics selection for query builder.png

    To create a metrics query utilize the Metrics Explorer.

    Multiple queries

    To add another query to a panel click the plus + icon on the last query row. Each query is assigned a letter for reference.

    add query.png

  3. Once the query runs you’ll need to flip the chart type to Area.
    Dashboard New Area Chart.png
  4. Modify the chart as desired.
  5. Click the Add to Dashboard button on the top right of the window to add the panel to your dashboard.
    Add to Dashboard button.png