Overview
Histograms group raw data values into intervals, or "bins," to represent the frequency of occurrences within a series. They reveal patterns such as clustering, dispersion, or skewness in the data, providing a clear visual summary of how values are distributed across a continuous variable.
By default, the height of each bar in a histogram represents the number of data points within its bin. In Mappica, you can also switch to a percentage-based vertical axis, where each bar reflects its proportion of the total data points in the series. Additionally, histograms can display multiple series of data, which can be either layered or stacked for comparison.
Because the margin sets the space between the chart axes and the edge of the container, ensure you add enough margin for any axis ticks or labels. If needed, use options in the Axes section such as Limit Tick Width, Limit Tick Characters, and Rotate Ticks to constrain the size of tick and label text.
Connecting to Datasets
In the
Dataset section, you can select the
dataset for your chart. If you need to add a dataset, this can be done by selecting
New Dataset in the
Project tab.
If you are on the Pro plan, you can upload your own files (in csv format) to use as datasets, by clicking New Dataset and then Upload Dataset.
After you have selected a dataset, you can optionally enable the Prefilter Dataset switch, which lets you filter the data that is supplied to the chart. The filter is a "prefilter" because it is applied before the visualization is generated; end users are unable to adjust the filter dynamically.
Next, the Data Format is displayed, which in the case of histograms is always set to Wide Data. This mean that each series in the histogram should be organized as a separate column in the dataset. The values within each column are treated as individual observations that will be grouped into bins for the histogram. You can specify the series to include by selecting the relevant fields under Series Fields.
Connecting to Filters
You can establish connections to filter elements under the Chart tab, in the Connections section, by making a selection under Filter.
A
Filter element can be styled as a series of checkboxes, a dropdown menu, or a slider. Values from the specified
Filter Field appear as individual checkboxes, dropdown menu items, or (for numeric filtering) slider values. A given chart can be connected to one or more filters, and the same filter can be connected to multiple charts or other elements.
When a filter element is connected to a chart, it dynamically controls the dataset records displayed in the chart based on the user's selections. Filters can also adjust the chart's axis range dynamically, provided one of the chart's axis fields is the same as the filter's Filter Field and the Minimum and Maximum Range values of that axis are set to auto.
Additionally, filter elements can inherit color formatting from a chart, provided that the chart is using
Long Data format and the chart's
Color Field is the same as the filter's
Filter Field. For more information, see the
Color Formatting section of the documentation for filter elements.
If your chart uses
Wide Data format, use a
Selector element instead of a filter to dynamically control the chart color series.
Typically, the
Filter element you connect to will use the same
Dataset as the chart element. However, this is not strictly necessary. If the filter and chart elements use different datasets, the filter will only affect the chart if the chart's dataset contains a field (column) with the same name as the
Filter Field in the filter element. In this case, the values in these fields must at least partially align for the filter to take effect. Any non-matching values between the fields will be ignored during filtering.
Connecting to Selectors
If you are using Wide Data format, you can establish a connection to a selector element under the Chart tab, in the Connections section, by making a selection under Selector.
Selector elements control which series fields are displayed in connected elements that use a wide data format. Selectors can be displayed as checkboxes, dropdowns, or legends. While a chart can be connected to only one selector, a single selector can be connected to multiple charts and other elements that use series fields. Once connected, the selector element dynamically controls the dataset fields (columns) passed to the chart as series fields based on user selections.
Annotations
In the Annotations section, under the Chart tab, you can select Add Data Line. This overlays a dashed line annotation to represent a calculated value for each histogram series. The line is formatted in the same color as the histogram bars, which usually requires that the bar opacity is reduced from 100% (this can be done in the Colors section of the Chart tab). The data line is set up as follows:
- Data Line Operation: Choose the Data Line Operation to calculate the "Average" or "Median" of the histogram values.
- Legend Text: The dashed data line will automatically be included in any legend connected to the histogram. By default this text will include the histogram series name and the data operation in parentheses. It is possible to edit the text that appears after the series name using the Legend Text option.
- Show Value: Select "Always" or "Hover" to display a dot at the top of the dashed line with the average or median value above it. In "Hover" mode, the value only appears when hovering.