# Bar Visualization Options

**Component Reference:** Bar or @splunk/visualizations/bar

Source: `@splunk/visualization-schemas/barOptionsSchema`

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `additionalTooltipFields` | array<string> | `[]` | Specify the fields to add to the default set of tooltips. Tooltips appear when you hover over events. These fields and their corresponding values are shown in addition to the ones displayed by default. Items: string |
| `backgroundColor` | string | `> themes.defaultBackgroundColor` | Specify the color used for the background. You can use a data source or hexadecimal code to apply the color. Pattern: `^#(?:[0-9a-fA-F]{3,4}\|[0-9a-fA-F]{6}\|[0-9a-fA-F]{8})$\|^transparent$\|^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$\|^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$\|\\$(\\w+:)?([^$\|:]+?)(\\\|[\|\\w]+)?\\$` |
| `barSpacing` | number | — | Specify the spacing (px) between columns in a bar chart. |
| `dataValuesDisplay` | string | `off` | Specify the labels to display. Enter "all" to show labels for all data points, "off" to show no labels, or "minmax" to show high and low values. Allowed values: `off`, `all`, `minmax` |
| `legendDisplay` | string | — | Specify the location of the legend on the panel. By default, legendDisplay is off when splitByLayout is trellis, and right otherwise. Allowed values: `right`, `left`, `top`, `bottom`, `off` |
| `legendLabels` | array<string> | — | Specify a list of labels to populate the legend in advance. For example, ["percent", "count"]. Items: string |
| `legendMode` | string | `standard` | Specify visual and behavioral settings for the tooltip and legend. "seriesCompare" is useful when comparing series. Allowed values: `standard`, `seriesCompare` |
| `legendReversed` | boolean | `false` | Specify whether to reverse the order of the legend items. |
| `legendTruncation` | string | `ellipsisEnd` | Specify how to display legend labels when they overflow the layout boundaries by replacing overflow text with an ellipsis. Allowed values: `ellipsisEnd`, `ellipsisMiddle`, `ellipsisStart`, `ellipsisOff` |
| `lineDashStyle` | string | `solid` | Specify a dash style for all overlay field lines. Allowed values: `solid`, `shortDash`, `shortDot`, `shortDashDot`, `shortDashDotDot`, `dot`, `dash`, `longDash`, `dashDot`, `longDashDot`, `longDashDotDot` |
| `lineDashStylesByField` | object | — | Specify a dash style to use for overlay lines for each field. For example, {"count": "longDashDot", "percent": "longDashDotDot"}.<br />        Valid values: "solid", "shortDash", "shortDot", "shortDashDot", "shortDashDotDot", "dot", "dash",<br />        "longDash", "dashDot", "longDashDot", "longDashDotDot". |
| `lineWidth` | number | `2` | Specify the line width (px) for overlay field lines. |
| `overlayFields` | array<unknown> \| string | — | Specify one or more fields to differentiate on the chart and display as chart overlays. |
| `resultLimit` | number | `50000` | Specify the number of data points to render in a chart. |
| `seriesColors` | array<string> | `["#7B56DB","#009CEB","#00CDAF","#DD9900","#FF677B","#CB2196","#813193","#0051B5","#008C80","#99B100","#FFA476","#FF6ACE","#AE8CFF","#00689D","#00490A","#465D00","#9D6300","#F6540B","#FF969E","#E47BFE"]` | Specify the colors to use in a series. For example, ["#FF0000", "#0000FF", "#008000"]. Items: string |
| `seriesColorsByField` | object | — | Specify the colors to use for specific fields in a series. For example, {“count”: “#008000”, “percent”: “#FFA500”}. |
| `seriesSpacing` | number | — | Specify the spacing (px) between clustered series in column and bar charts. |
| `showIndependentYRanges` | boolean | `false` | Specify whether split series charts have independent y-ranges. |
| `showOverlayY2Axis` | boolean | `false` | Enable a second y-axis for chart overlays. All overlay fields map to a second y-axis. |
| `showRoundedY2AxisLabels` | boolean | `true` | Specify whether to round second y-axis values to the nearest integer. |
| `showSplitSeries` | boolean | `false` | Specify whether to split a multi-series chart into separate charts that are stacked from top to bottom, one for each series. |
| `showXMajorGridLines` | boolean | `false` | Specify whether to show major grid lines on the x-axis. |
| `showY2AxisWithZero` | boolean | `false` | Specify whether to include zero the second y-axis range . |
| `showY2MajorGridLines` | boolean | `false` | Specify whether to show major grid lines on the second y-axis. |
| `showY2MinorGridLines` | boolean | `false` | Specify whether to show minor grid lines on the second y-axis. |
| `showYAxisExtendedRange` | boolean | `true` | Specify whether to extend the y-axis to include whole major tick marks. |
| `showYAxisWithZero` | boolean | `false` | Specify whether to include zero in the y-axis range. |
| `showYMajorGridLines` | boolean | `true` | Specify whether to show major grid lines on the y-axis. |
| `showYMinorGridLines` | boolean | `false` | Specify whether to show minor grid lines on the y-axis. |
| `splitByLayout` | string | `off` | Specify the layout method by which to display the visualization, which splits the data into individual visualizations based on a certain category. Allowed values: `off`, `trellis` |
| `stackMode` | string | `auto` | Specify stack mode. Allowed values: `auto`, `stacked`, `stacked100` |
| `trellisBackgroundColor` | string | `> themes.defaultBackgroundColor` | Specify the color used for the trellis container background by using a hexadecimal code. For example, #0000FF. Pattern: `^#(?:[0-9a-fA-F]{3,4}\|[0-9a-fA-F]{6}\|[0-9a-fA-F]{8})$\|^transparent$\|^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$\|^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$\|\\$(\\w+:)?([^$\|:]+?)(\\\|[\|\\w]+)?\\$` |
| `trellisColumns` | number | `3` | Specify the number of visualizations to display in a given row of the trellis container. The remaining visualizations will wrap accordingly. If nothing is specified, it will be auto-set based on the trellisMinColumnWidth. The minimum value is 1. Range: min 1 |
| `trellisMinColumnWidth` | number | `250` | Specify the minimum width, in pixels, of each visualization in the trellis container. If the window or panel is resized, the remaining visualizations may be viewed by scrolling. The minimum value is 1. Range: min 1 |
| `trellisPageCount` | number | `20` | Specify the maximum number of visualizations to display in a single page in the trellis container. The remaining visualizations will paginate accordingly. The minimum value is 1. Range: min 1 |
| `trellisRowHeight` | number | `180` | Specify the height, in pixels, of each visualization in the trellis container. If the window or panel is resized, the remaining visualizations may be viewed by scrolling. The minimum value is 1. Range: min 1 |
| `trellisSharedScale` | boolean | `true` | Specify whether all visualizations will share the same scale in the trellis container. |
| `trellisSortBy` | string | `result` | Specify the sort method for the individual visualizations in the trellis container. Use result to sort by search result order, or name to sort alphabetically by visualization label. Allowed values: `result`, `name` |
| `trellisSortOrder` | string | `ascending` | Specify the sort order for the individual visualizations in the trellis container. This setting applies to the sort method specified in trellisSortBy. Allowed values: `ascending`, `descending` |
| `trellisSplitBy` | string | — | Specify the field name of the column with categories used, or “aggregations”, to split the data into individual visualizations for trellis display, if applicable. If a SPL `timechart` command is used, this may default to the SPL `by` clause field. If a SPL `chart` command is used, this may default to the first string field. |
| `x` | array<string \| number> | `> primary \| seriesByIndex(0)` | Specify the data source to apply to the x-axis. Items: string \| number |
| `xAxisLabelVisibility` | string | `auto` | Specify whether to show labels on the x-axis. Allowed values: `auto`, `show`, `hide` |
| `xAxisLineVisibility` | string | `hide` | Specify whether to show the x-axis line. Allowed values: `hide`, `show` |
| `xAxisMajorTickSize` | number | `6` | Specify the size (px) of major tick marks on the x-axis. |
| `xAxisMajorTickVisibility` | string | `auto` | Specify whether to show major tick marks on the x-axis. Allowed values: `auto`, `show`, `hide` |
| `xAxisMaxLabelParts` | number | `3` | Specify the maximum number of time-parts for a tick label. The 3 possible parts are year, month, and time. Values can range from 1 to 3. Range: min 1, max 3 |
| `xAxisTitleText` | string | — | Specify the title of the x-axis. |
| `xAxisTitleVisibility` | string | `show` | Specify whether to show the title of the x-axis. Allowed values: `hide`, `show` |
| `xField` | string | `> x \| getField()` | Specify the field to map to the x-axis. |
| `y` | array<string \| number> | `> primary \| frameBySeriesIndexRange(1)` | Specify the data source to apply to the y-axis. Items: string \| number |
| `y2` | array<string \| number> | — | Specify the data source to apply to the second y-axis Items: string \| number |
| `y2AxisAbbreviation` | string | `auto` | Specify whether to abbreviate large y2-axis values with the closest International System of Units (SI) prefix. Allowed values: `auto`, `off` |
| `y2AxisLabelVisibility` | string | `auto` | Specify whether to show labels on the second y-axis. Allowed values: `auto`, `show`, `hide` |
| `y2AxisLineVisibility` | string | `hide` | Specify whether to show the second y-axis line. Allowed values: `hide`, `show` |
| `y2AxisMajorTickInterval` | string \| number | `auto` | Specify the spacing unit between major tick marks along the numeric second y-axis. |
| `y2AxisMajorTickSize` | number | `6` | Specify the size (px) of major tick marks on the second y-axis. |
| `y2AxisMajorTickVisibility` | string | `auto` | Specify whether to show major tick marks on the second y-axis. Allowed values: `auto`, `show`, `hide` |
| `y2AxisMax` | string \| number | `auto` | Specify the largest value to display in the visible second y-axis range. |
| `y2AxisMin` | string \| number | `auto` | Specify the smallest value for the visible second y-axis range. |
| `y2AxisMinorTickSize` | number | `6` | Specify the size (px) of minor tick marks on the second y-axis. |
| `y2AxisMinorTickVisibility` | string | `auto` | Specify whether to show minor tick marks on the second y-axis. Allowed values: `auto`, `show`, `hide` |
| `y2AxisScale` | string | `linear` | Specify the type of scale that applies to a numerical second y-axis. Allowed values: `linear`, `log` |
| `y2AxisTitleText` | string | — | Specify the title of the second y-axis. |
| `y2AxisTitleVisibility` | string | `show` | Specify whether to show the title of the second y-axis. Allowed values: `hide`, `show` |
| `y2Fields` | array<string> \| string | `> y2 \| getField()` | Specify one or more fields to map to a second y-axis. Items: string |
| `yAxisAbbreviation` | string | `auto` | Specify whether to abbreviate large y-axis values with the closest International System of Units (SI) prefix. Allowed values: `auto`, `off` |
| `yAxisLabelVisibility` | string | `auto` | Specify whether to show labels on the y-axis. Allowed values: `auto`, `show`, `hide` |
| `yAxisLineVisibility` | string | `hide` | Specify whether to show the y-axis line. Allowed values: `hide`, `show` |
| `yAxisMajorTickInterval` | string \| number | `auto` | Specify the spacing unit between major tick marks along the numeric y-axis. |
| `yAxisMajorTickSize` | number | `6` | Specify the size (px) of major tick marks on the y-axis. |
| `yAxisMajorTickVisibility` | string | `auto` | Specify whether to show major tick marks on the y-axis. Allowed values: `auto`, `show`, `hide` |
| `yAxisMax` | string \| number | `auto` | Specify the largest value to display in the visible y-axis range. |
| `yAxisMin` | string \| number | `auto` | Specify the smallest value for the visible y-axis range. |
| `yAxisMinorTickSize` | number | `6` | Specify the size (px) of minor tick marks on the y-axis. |
| `yAxisMinorTickVisibility` | string | `auto` | Specify whether to show  minor tick marks on the y-axis. Allowed values: `auto`, `show`, `hide` |
| `yAxisScale` | string | `linear` | Specify the type of scale that applies to a numerical y-axis. Allowed values: `linear`, `log` |
| `yAxisTitleText` | string | — | Specify the title of the y-axis. |
| `yAxisTitleVisibility` | string | `show` | Specify whether to show the title of the y-axis. Allowed values: `hide`, `show` |
| `yFields` | string | `> y \| getField()` | Specify the field to map to the y-axis. |

_Auto-generated; do not edit by hand._
