Developing Dashboards, Views, and Apps for Splunk Web

 


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 layoutSprite and have the following additional properties (see the tables above for full definitions).

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 area charts. The area chart is a cartesian chart that renders each series in a data set as a filled area with an optional line. The data table upon which the chart is structured must contain at least two columns, where the first column contains the values to be plotted on the x-axis (such as _time values for a timechart) and each additional column contains a series of values to be plotted on the y-axis.

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 bar charts. The bar chart is a cartesian chart that renders data as horizontal bars. The data set must contain at least two columns, where the first column contains the values to be plotted on the y-axis and each additional column contains a series of values to be plotted on the x-axis.

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 bubble charts. The bubble chart is a cartesian chart that renders data as scattered "bubbles" whose size is determined by a third dimension of data. The data table upon which the chart is structured must contain at least three columns, where the first column contains the values to be plotted on the x-axis, the second column contains the values to be plotted on the y-axis, and each additional column contains values that are to be plotted on the bubble scale.

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 column charts. The column chart is a Cartesian chart that renders data as vertical columns. The data table upon which the chart is structured must contain at least two columns, where the first column contains the values to be plotted on the x-axis, and each additional column contains a series of values to be plotted on the y-axis.

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 histogram charts. The histogram chart is a cartesian chart that renders data as vertical columns whose width is determined by separate start and end values. The data table upon which the chart is structured must contain at least three columns, where column 0 contains the starting values to be plotted on the x-axis, column 1 contains the ending values to be plotted on the x-axis, and column 2 contains the values to be plotted on the y-axis. Multiple series are currently unsupported and additional columns are ignored.

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 line charts. The line chart is a cartesian chart that renders each series in a data set as a line with optional markers. The data table upon which the chart is structured must contain at least two columns, where the first column contains the values to be plotted on the x-axis (such as _time values for a timechart) and each additional column contains a series of values to be plotted on the y-axis.

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 pie charts. The pie chart is a basic chart that renders data as a circle divided into "slices." The data table upon which the chart is structured must contain at least two columns, where the first column contains the labels for each pie chart slice, and the second column contains the values for those slices. Splunk pie charts do not currently support multiple series, and additional columns are not supported.

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 rangeMarker charts. The range marker is a single-axis chart that renders a fill spanning the area between two points on an axis. The data table upon which the chart is structured must contain at least one column with two rows, where the first row contains the minimum value to be plotted on the axis, and the second row contains the maximum value. The minimumValue and maximumValue properties may optionally be used in place of the data set. Range marker charts are related to value marker charts in that they are mainly useful as overlays above another chart, such as a line chart.

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 ratioBar charts. The ratio bar chart is a basic chart that renders data as a divided bar. The data table upon which the chart is structured must contain at least two columns, where the first column contains the labels for each bar and the second column contains the values that correspond to each label. Multiple series are currently not supported, and additional columns are ignored.

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 scatter charts. The scatter chart is a Cartesian chart that renders data as scattered markers. The data table upon which the chart is structured must contain at least two columns, where the first column contains the values to be plotted on the x-axis, and each additional column contains a series of values to be plotted on the y-axis.

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 valueMarker charts. Value marker charts are are single-axis charts that render a line at a single point on an axis. The data table upon which the chart is structured must contain at least one column with one row, where the row contains the value to be plotted on the axis, and the second row contains the maximum value. The value property can optionally be used in place of the data set. Value marker charts are related to range marker charts in that they are mainly useful as overlays above another chart, such as a line chart.

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

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

Enables you to specify a list of legend types. See "Advanced configuration - Layout and data table properties" for more information.

Properties

Legend properties

The legend is the main visual legend type that displays labels and their corresponding color swatches. It inherits properties from layoutSprite and has the following additional properties.

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.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!