Chart and legend properties
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Chart and legend properties
This section covers properties for chart and legend, two of the more commonly modified flash charting elements.
Chart
Usage: charting.chart.*
Use chart to define properties specific to the type of chart being displayed. For an overview of common chart types used in Splunk and their data structure requirements, see "Chart gallery" in the User Manual.
Note: All charts have data and legend properties. There are also properties that are specific to single axis charts, and properties that are particular to Cartesian charts (charts with two axes, in other words). See the table below for details.
Values
The chart object has 12 possible values:
See the table below for detail on the parameters available for each chart type.
Example
<option name="charting.chart">column</option> <option name="charting.chart.useAbsoluteSpacing">true</option> <option name="charting.chart.columnSpacing">5</option> <option name="charting.axisX.categories">[pine,beech,mahogany,white,black]</option>
Sets up the chart to display as a column chart with five preset categories to plot on the x-axis, and a space of five pixels between each column (useAbsoluteSpacing = true ensures that the columnSpacing values are measured in terms of pixels).
Also used by
Enables you to specify chart layouts. For more information, see "Advanced configuration - Layout and data table properties" in this manual.
Properties
| All charts All chart types inherit properties from | |||
| Property name | Value type | Definition | Default |
data | dataTable | Affects the form of the data table that Splunk uses to plot the chart. | See the data table for specific defaults.
|
legend | legend | Affects the display of the legend for the chart. | See the legend table for specific defaults.
|
| All single axis charts The following property is applicable only to single axis chart types, such as such as range marker and value marker charts. | |||
axis | axis | Properties that affect the axis on which report data is plotted. | See the axis table for specific defaults.
|
| All cartesian (dual axis) charts The following properties are applicable only to cartesian chart types, such as bar, column, area, line, and scatter charts. | |||
axisX | axis | Properties that affect the x-axis upon which data is plotted. The x-axis is horizontal. | See the axis table for specific defaults.
|
axisY | axis | Properties that affect the y-axis upon which data is plotted. The y-axis is vertical. | See the axis table for specific defaults.
|
| Area chart properties The following properties are applicable only to | |||
areaBrushPalette | brushPalette | Indicates the brush palette used for painting the filled areas in area charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
areaStyle | style<sprite> | Indicates the properties to apply to area sprites in area charts. | See the sprite table for specific defaults.
|
lineBrushPalette | brushPalette | Indicates the brush palette to use for painting lines in area charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
lineStyle | style<sprite> | The properties to apply to line sprites in area charts. | See the sprite table for specific defaults.
|
showLines | boolean | Indicates whether or not lines should be painted in area charts. | true
|
stackMode | string | Used to set up stacked area charts. Valid values are default, stacked, stacked100. | default
|
nullValueMode | string | Determines how the area chart handles null values. Valid values are gaps, zero, and connect. | gaps
|
| Bar chart properties The following properties are applicable only to | |||
barBrushPalette | brushPalette | Indicates he brush palette used for painting the bars in bar charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
barShapePalette | shapePalette | Indicates the shape palette that defines the shapes of bars in bar charts. Reference an existing palette with the @ symbol: @myshapepalette. | See the shapePalette table for specific defaults.
|
barStyle | style<sprite> | The properties to apply to bar sprites in bar charts. | See the sprite table for specific defaults.
|
barAlignment | number | Controls the alignment of bars relative to their position on the y axis. Typical values are between 0 (top aligned) and 1 (bottom aligned). | 0.5 (a middle alignment)
|
barSpacing | number | Controls the spacing between bars in a bar chart. Whether this property is measured in pixels or is relative to the bar heights depends on the setting of useAbsoluteSpacing (below). | 1.
|
seriesSpacing | number | Controls the spacing between clustered series in a bar chart when stackMode = default. Whether this property is measured in pixels or is relative to the bar heights depends on the setting of useAbsoluteSpacing (below). | 0
|
useAbsoluteSpacing | boolean | Determines whether the values of barSpacing and seriesSpacing are pixels (true) or relative to the bar heights (false) | false
|
stackMode | string | Sets up stacked bar charts. Valid values are default, stacked, and stacked100. | default
|
| Bubble chart properties The following properties are applicable only to | |||
bubbleBrushPalette | brushPalette | Indicates the brush palette used for painting the bubbles in bubble charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
bubbleShapePalette | shapePalette | Indicates the shape palette that defines the shapes of bubbles in bubble charts. Reference an existing palette with the @ symbol: @myshapepalette. | See the shapePalette table for specific defaults.
|
bubbleStyle | style<sprite> | The properties to apply to bubble sprites in bubble charts. | See the sprite table for specific defaults.
|
bubbleMinimumSize | number | The minimum size of bubbles in pixels. | 10
|
bubbleMaximumSize | number | The maximum size of bubbles in pixels. | 50
|
bubbleScale | scale | The logarithmic scale to apply to bubble size. Logs should be expressed as log<base #>. Example: log10. Use linear if a logarithmic scale should not be used. | linear
|
| Column chart properties The following properties are applicable only to | |||
columnBrushPalette | brushPalette | Indicates the brush palette used for painting the columns in column charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
columnShapePalette | shapePalette | Indicates the shape palette that defines the shapes of columns in column charts. Reference an existing palette with the @ symbol: @myshapepalette. | See the shapePalette table for specific defaults.
|
columnStyle | style<sprite> | The properties to apply to column sprites in column charts. | See the sprite table for specific defaults.
|
columnAlignment | number | The alignment of columns relative to their position on the x-axis. Typical values are between 0 (left aligned) and 1 (right aligned). | 0.5 (a centered alignment)
|
columnSpacing | number | Controls the spacing between columns in a column chart | 1.
|
seriesSpacing | number | Controls the spacing between clustered series in a column chart when stackMode = default | 0
|
useAbsoluteSpacing | boolean | Determines whether the values of columnSpacing and seriesSpacing are pixels (true) or relative to the column heights (false) | false
|
stackMode | string | Sets up stacked column charts. Valid values are default, stacked, and stacked100. | default
|
| Histogram properties The following properties are applicable only to | |||
columnBrushPalette | brushPalette | Indicates the brush palette used for painting the columns in histogram charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
columnShapePalette | shapePalette | Indicates the shape palette that defines the shapes of columns in histogram charts. Reference an existing palette with the @ symbol: @myshapepalette. | See the shapePalette for specific defaults.
|
columnStyle | style<sprite> | The properties to apply to column sprites in histogram charts. | See the sprite table for specific defaults.
|
| Line chart properties The following properties are applicable only to | |||
lineBrushPalette | brushPalette | The brush palette to use for painting lines in line charts. | See the brushPalette table for specific defaults.
|
lineStyle | style<sprite> | The properties to apply to line sprites in line charts. | See the sprite table for specific defaults.
|
markerBrushPalette | brushPalette | Indicates the brush palette to use for painting markers in line charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
markerShapePalette | shapePalette | Indicates the shape palette that defines the shape of markers in line charts. Reference an existing palette with the @ symbol: @myshapepalette. | See the shapePalette table for specific defaults.
|
markerStyle | style<sprite> | The properties to apply to marker sprites in line charts. | See the sprite table for specific defaults.
|
showMarkers | boolean | Indicates whether or not markers should be painted in line charts. | true
|
stackMode | string | Used to set up stacked line charts. Valid values are default, stacked, stacked100. | default
|
nullValueMode | string | Determines how the line chart handles null values. Valid values are gaps, zero, and connect. | gaps
|
| Pie chart properties The following properties are applicable only to | |||
sliceBrushPalette | brushPalette | The brush palette to use for painting slices in pie charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
sliceStyle | style<sprite> | The properties to apply to slice sprites in line charts. | See the sprite table for specific defaults.
|
sliceCollapsingThreshold | number | The threshold at which smaller slices should be collapsed into a consolidated slice. Valid values are between 0 (no collapsing) and 1 (all slices are collapsed into a single pie). | 0.01 (slices smaller than 1% of the whole pie are collapsed)
|
sliceCollapsingLabel | string | The label for the consolidated slice. | other
|
labelStyle | style<textBlock> | Applies properties to pie slice labels | See the textBlock table for specific defaults.
|
labelLineBrush | brush | Indicates the brush to use for painting label lines. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brush table for specific defaults.
|
showLabels | boolean | Determines whether or not pie chart labels are displayed. | true
|
| Range marker properties The following properties are applicable only to | |||
minimumValue | string | The optional minimum value to plot. | Not assigned. |
maximumValue | string | The optional maximum value to plot. | Not assigned. |
orientation | string | Determines the range marker orientation. Valid values are x (horizontal) and y (vertical). | x
|
lineBrush | brush | Indicates the brush to use for painting label lines. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brush table for specific defaults.
|
innerFillBrush | brush | Indicates the brush to use for painting the fill inside the minimum and maximum range marker values. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brush table for specific defaults.
|
outerFillBrush | brush | Indicates the brush to use for painting the fill outside the minimum and maximum range marker values. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brush table for specific defaults.
|
| Ratio bar chart properties The following properties are applicable only to | |||
orientation | string | Determines the ratio bar orientation. Valid values are x (horizontal) and y (vertical). | x
|
barBrushPalette | brushPalette | Indicates the brush palette used for painting the bars in ratio bar charts. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
barStyle | style<sprite> | The properties that can be applied to bar sprites in ratio bar charts. | See the sprite table for specific defaults.
|
barCollapsingThreshold | number | Controls the threshold at which smaller ratio bars are collapsed into a consolidated bar. Valid values are between 0 (no collapsing) and 1 (all bars are collapsed into a consolidated bar). | 0.01 (bars smaller than 1% of the whole are collapsed).
|
sliceCollapsingLabel | string | The label for the consolidated ratio bar. | other
|
labelStyle | style<textBlock> | Applies properties to ratio bar labels | See the textBlock table for specific defaults.
|
labelLineBrush | brush | Indicates the brush to use for painting label lines. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brush table for specific defaults.
|
showLabels | boolean | Determines whether or not ratio bar chart labels are displayed. | true
|
| Scatter chart properties The following properties are applicable only to | |||
markerBrushPalette | brushPalette | Indicates the brush palette to use for painting markers. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brushPalette table for specific defaults.
|
markerShapePalette | shapePalette | Indicates the shape palette that defines the shapes of markers. Reference an existing palette with the @ symbol: @myshapepalette. | See the shapePalette table for specific defaults.
|
markerStyle | style<sprite> | Applies properties to marker sprites. | See the sprite table for specific defaults.
|
| Value marker properties The following properties are applicable only to | |||
value | string | The optional value to plot. | Not assigned. |
orientation | string | Determines the value marker orientation. Valid values are x (horizontal) and y (vertical). | x
|
lineBrush | brush | Indicates the brush to use for painting the value marker line. Reference an existing palette with the @ symbol: @mybrushpalette. | See the brush table for specific defaults.
|
Legend
Usage: charting.legend.*
The legend element controls the chart legend. It is used by all chart types.
Note: You can also take advantage of a predefined external legend element called externalLegend. externalLegendis a non-visual object that connects to an external source responsible for synchronizing legends across multiple charting modules in a view. It has no additional properties. It is referenced by the masterLegend parameter (see below). You can also refer to it directly if necessary using the @ symbol: @externalLegend.
For more information about making element and property references see "Advanced charting options" in this manual.
Values
-
legend
Example
<option name="charting.legend">legend</option>
<option name="charting.legend.placement">left</option>
<option name="charting.legend.labelStyle.maximumWidth">500</option>
<option name="charting.legend.labelStyle.defaultTextFormat">{italic:true,size:14}</option>
These settings have the legend appearing to the left of the chart, with a maximum allowable width of 500 pixels, and text that is 14 points in size and italicized.
defaultTextFormat and maximumWidth are textBlock properties. maximumWidth is a property that is ultimately inherited from layoutSprite. defaultTextFormat enables you to set a variety of text formatting properties in one line. See the table below for the full list of legend properties.
Also used by
-
layout.legends
Enables you to specify a list of legend types. See "Advanced configuration - Layout and data table properties" for more information.
Properties
| Legend properties The | |||
| Property name | Value type | Definition | Default |
labels | array<string> | A comma-separated list of labels to pre-populate the legend with. | Not assigned |
defaultSwatchBrushPalette | brushPalette | The brush palette to use for painting swatches that have not been provided by a chart. Reference an existing palette with the @ symbol: @mybrushpalette. | Not assigned |
masterLegend | legend | Another legend to delegate label-index mapping to. Reference an existing legend with the @ symbol: @mylegend.Note: This parameter influences series color mappings made with seriesColors. For more information, see the Chart colors subtopic of the "Advanced charting" topic, in this manual. | Not assigned |
placement | string | The placement of the legend within a cartesian layout. Valid values are left, right, top, bottom, and center. | right
|
orientation | string | Controls the orientation of the legend in relation to the chart axes. Valid values are x, y, and auto. | auto
|
labelStyle | style<textBlock> | Applies properties to legend labels. See the textBlock properties for more information. | Not assigned |
swatchStyle | style<layoutSprite> | Applies layoutSprite properties to legend swatches. | Not assigned |
This documentation applies to the following versions of Splunk: 4.1 , 4.1.1 , 4.1.2 , 4.1.3 , 4.1.4 , 4.1.5 , 4.1.6 , 4.1.7 , 4.1.8 View the Article History for its revisions.