Navigation
This documentation refers to the MongoDB Charts service in MongoDB Atlas. Read the on-premises documentation to learn how to use the MongoDB Charts on site.

Value Axis Options

MongoDB Charts offers several customization options which modify the representation of a chart’s X and Y value axes without affecting the formatting of the data points in the visualization.

Value axis customizations

Note

A value axis shows a continuous scale of values. Charts such as Bar/Column and Discrete Line/Area have just one value axis. Continuous line and area and scatter charts have two value axes.

Max and Min

The Max and Min value axis options allow you to specify maximum and minimum values to display on a chart. Any data points with values outside the specified limits appear at the boundaries of the chart. Setting a maximum display value is useful for removing outlying data from the chart and allowing the viewer to focus on more relevant information.

Note

Changing the minimum for bar and column charts from the default of zero is not recommended. Doing so means the length of the bars is no longer proportional to the data point values.

The following chart types can use max and min:

Logarithmic Scale

Toggling the Logarithmic Scale switch to the On position causes your chart to use a logarithmic scale instead of a linear scale for data values. Using a logarithmic scale is helpful for showing the percentage change from one value to the next and for charts with a large value differential from smallest to largest. Data sets such as stock market movements, earthquake strength measurements, and global population sizes are good use cases for a logarithmic scale chart.

Logarithmic Scale Considerations

  • Use the Logarithmic Scale option only with chart data that consists of either all positive values or all negative values. If the chart includes a mix of positive and negative values, or if it includes the value 0, the chart will not render.
  • Bar and column charts normally have a baseline of 0, but logarithmic scale charts have a baseline of 1 because log(0) is undefined. As a result, charts with data points between 0 and 1 do not render well. You can mitigate this effect by setting the axis minimum of the chart to a value greater than zero but smaller than the lowest value in the data set.

The following chart types can use logarithmic scale:

Label Override

The Label Override field allows you to create a custom axis label. Custom labels can be more descriptive than the default labels and help chart viewers quickly grasp the significance of chart data.

The Label Override customization option is available on the X or Y value axis for charts in which the author has encoded multiple data series by mapping more than one field on a given axis. To customize the axis label for charts that have a single field mapped, use the Label Override option within that field’s customization options.

The following chart types can use label override:

Smart Labels for Dates

Smart labels for dates are axis markers grouped by units of time to reduce repetition of information. They are generated automatically based on the range of the chart when a date type field is encoded on an X or Y value axis.

The following chart types can use smart labels for dates:

Smart labels are enabled by default when dates fields are encoded on value axes on supported chart types.. To toggle smart labels on and off:

  1. Click the Customize tab above the encoding channels in the Chart Builder.
  2. Click the X or Y Axis section.
  3. If the Use Smart Labels on Axis toggle swich is set to Off, toggle it to On.
Smart label toggle switch

Note

When smart labels are enabled, date and time formatting options remain available. Any formatting options you apply are visible in the chart’s tooltips.