Developing Dashboards, Views, and Apps for Splunk Web

 


Font, color, brush, shape and related palette properties

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.

Font, color, brush, shape and related palette properties

This section covers properties for basic font, color, brush, shape, and palettes, which are used to design the appearance of the charting objects. For example, you use brushes to determine the line thickness of the lines in line charts, set up gradient fills for area charts, and paint pie chart wedges with images rather than colors.

Splunk delivers a set of pre-configured brushes, color palettes, and brush palettes with different standardized settings. You can adjust those settings or define brushes and palettes of your own and reference them.

For example, the predefined lineBrushPalette element inherits all of its properties from the brushPalette element, but the values of those properties have been set to paint a standardized line in Splunk line and area charts. The predefined areaBrushPalette element, on the other hand also inherits its properties from the brushPalette but has been designed to paint a standardized fill for area charts.

When you set up a line chart, the lineBrushPalette is associated with it by default. But what if you want to use a line brush palette with settings that are different than the standard one? You can create a new one--that you might call myLineBrushPalette--and then reference it like so:

<option name="charting.chart">line</option>
<option name="charting.chart.lineBrushPalette">@myLineBrushPalette</option>

For more information about designing custom brushes and palettes, see "Advanced charting options," in this manual.

Font and color

Usage: charting.fontFace, charting.foregroundColor, and so on.

Use the font and color properties to define the baseline font and color aspects of your chart.

Examples

Setting font properties:

<option name="charting.fontFace">_sans</option>
<option name="charting.fontSize">11</option>
<option name="charting.fontColor">0x000000</option>

Setting color properties at the series level:

<option name="charting.foregroundColor">0x000000</option>
<option name="charting.backgroundColor">0xFFFFFF</option>
<option name="charting.seriesColors">[0x6CB8CA,0xFAC61D,0xD85E3D,0x956E96,
0xF7912C,0x9AC23C,0x998C55,0xDD87B0,0x5479AF,0xE0A93B,0x6B8930,0xA04558,
0xA7D4DF,0xFCDD77,0xE89E8B,0xBFA8C0,0xFABD80,0xC2DA8A,0xC2BA99,0xEBB7D0,
0x98AFCF,0xECCB89,0xA6B883,0xC68F9B,0x416E79,0x967711,0x823825,0x59425A,
0x94571A,0x5C7424,0x5C5433,0x85516A,0x324969,0x866523,0x40521D,0x602935]</option>

Note: The masterLegend parameter influences series color mappings made with seriesColors. For more information, see the Chart colors subtopic of the "Advanced charting options" topic, in this manual.

Properties

Font properties

The following properties enable you to set basic font characteristics.

Property name Value type Definition Default
fontFace string Identifies the default font for the chart. Determines the type of font used for the text. Valid values are _sans (for the default sans-serif font), _serif (for the default serif font) and _typewriter (for the default monospaced font). Additionally you can assign popular fonts by name, such as verdanna--if the font is unavailable the browser will use the machine's default font, which is usually something like Times New Roman. _sans
fontSize number Identifies the font size in pixels. For example, choose 14 to have a 14px font size. 11
fontColor number Uses a hexadecimal value to define the font color. 0x000000 (black)
Color properties

The following properties enable you to set basic color characteristics.

foregroundColor number Used to color the foreground elements that aren't fonts or chart series elements (which are colored with fontColor and seriesColors properties, respectively. Foreground elements include axis lines, grid lines, or the lines for pie chart labels. Uses a hexadecimal value to define the color. 0x000000 (black)
backgroundColor number Controls the color of the background of the flash chart area. Uses a hexadecimal value to define the color. 0xFFFFFF (white)
seriesColors array<number> Uses an array of hexadecimal values to define the colors of chart series (surrounded by brackets and separated by commas, no spaces). See the Define series colors subtopic in the Charting configurations overview for more information.

Note: The masterLegend parameter influences series color mappings made with seriesColors. For more information, see the Chart colors subtopic of the "Advanced charting options" topic, in this manual.
[0x6CB8CA,0xFAC61D,0xD85E3D,0x956E96,

0xF7912C,0x9AC23C,0x998C55,0xDD87B0,
0x5479AF,0xE0A93B,0x6B8930,0xA04558,
0xA7D4DF,0xFCDD77,0xE89E8B,0xBFA8C0,
0xFABD80,0xC2DA8A,0xC2BA99,0xEBB7D0,
0x98AFCF,0xECCB89,0xA6B883,0xC68F9B,
0x416E79,0x967711,0x823825,0x59425A,
0x94571A,0x5C7424,0x5C5433,0x85516A,
0x324969,0x866523,0x40521D,0x602935]

Brush

Usage: charting.backgroundBrush.*, charting.axisLineBrush.*, and so on.

You can use brush properties to define a new brush type, or to change the defaults of an existing brush type that you're applying to a chart.

Values

The different kinds of brushes that you can apply include:

Examples

Applying the solidFill brush to the backgroundBrush brush type and setting it so that it has a solid red fill with 50% transparency:

<option name="charting.backgroundBrush">solidFill</option>
<option name="charting.backgroundBrush.color">0xFF0000</option>
<option name="charting.backgroundBrush.alpha">0.5</option>

Setting up a radial gradient fill in the background:

<option name="charting.backgroundBrush">gradientFill</option>
<option name="charting.backgroundBrush.type">radial</option>
<option name="charting.backgroundBrush.colors">[0xFF0000,0x0000FF]</option>
<option name="charting.backgroundBrush.alphas">[1,1]</option>
<option name="charting.backgroundBrush.ratios">[0,255]</option>
<option name="charting.backgroundBrush.focalPointRatio>.5</option>

Used by

The following brush types inherit their properties from brush:

chart objects:

axis label objects:

grid line objects:

Properties

Camera fill brush

The cameraFill brush paints with live video captured from a computer-mounted camera.

Property name Value type Definition Default
cameraIndex number The zero-based index of the camera to use if multiple cameras are available. auto
repeat boolean Determines whether the image should be repeated when it is tiled. Go here for more information about the repeat parameter. true
smooth boolean Determines whether the image is smoothed when it is scaled. Go here for more information about the repeat parameter. false
stretchMode string Determines how the image tile is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, uniformToWidth and uniformToHeight fill
alignmentX number The horizontal alignment of the image tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number The vertical alignment of the image tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the image tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). This produces a 3x3 transformation matrix object. No default defined. You must set this value.
renderTransform matrix Defines the transformation matrix to apply to the final rendered fill. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). This produces a 3x3 transformation matrix object. No default defined.
fitToDrawing boolean Determines whether the image tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false
Dashed stroke brush

The dashedStroke brush paints with dashed lines. Go here for more information about dashed stroke parameters.

dashSize number Determines the size of each dash in pixels. 4
dashSpacing number Sets the size of the spaces between each dash in pixels. 4
thickness number Determines the thickness of the stroke in pixels. A value of 0 indicates hairline thickness. 0
color number Determines the hexadecimal color of the stroke. 0x000000 (black)
alpha number Sets the alpha transparency of the stroke. Valid values are between 0 (transparent) and 1 (opaque). 1
pixelHinting boolean Indicates whether the stroke should be hinted to full pixels. false
scaleMode string Identifies the stroke scaling mode. Valid values are normal, none, horizontal, and vertical. normal
caps string Determines the type of stroke end caps to use. Valid values are none, round, and square. round
joints string Determines the type of joints to use at stroke angles. Valid values are miter, round, and bevel. round
miterLimit number Determines the limit at which miter joints are cut off. The value expresses a factor of the stroke thickness (see above). It is measured in pixels. 3
Gradient fill brush

The gradientFill brush paints fills with a color gradient. For more information about the gradient fill brush and its Flash parameters, go here.

type string Indicates the type of gradient to use. Valid values are linear (where color changes uniformly in a linear direction, vertically, horizontally, or diagonally) and radial (where where color changes in a circular fashion in all directions from a central point to the gradient edge) . linear
colors array<number> Defines the list of hexadecimal color values to use in the gradient. Must be comma-delimited without spaces, and within brackets.

Note: The colors, alphas, and ratios properties are used simultaneously to define how the gradient should be drawn. If you do not give values to these properties a solid black fill will be drawn. If you define two colors values, you must also define two corresponding values each for the alphas and ratios parameters.
No default defined.
alphas array<number> Provides the list of alpha transparency values corresponding to the colors list. Valid values are between 0 (transparent) and 1 (opaque). Must be comma-delimited without spaces, and within brackets.

Note: The colors, alphas, and ratios properties are used simultaneously to define how the gradient should be drawn. If you do not give values to these properties a solid black fill will be drawn. If you define two alphas values, you must also define two corresponding values each for the colors and ratios parameters.
No defaults.
ratios array<number> Provides the list of color distribution ratios corresponding to the colors list (see above). The ratios define the percentage of the gradientWidth where the color is sampled at 100%. Valid values are between 0 (left) and 255 (right). Must be comma-delimited without spaces, and within brackets.

Note: The colors, alphas, and ratios properites are used simultaneously to define how the gradient should be drawn. If you do not give values to these properties a solid black fill will be drawn. If you define two ratios values, you must also define two corresponding values each for the colors and alphas parameters.
No default defined.
spreadMethod string Indicates the method to use for spreading the gradient when it is tiled. Valid values are pad (use the terminal colors of the gradient to fill the remainder of the region), reflect (reflect the gradient pattern start-to-end, end-to-start, start-to-end, and so on continuously until the region is filled), and repeat (repeat the gradient pattern start-to-end, start-to-end, start-to-end until the region is filled). pad
interpolationMethod string Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb and linearRGB. rgb
focalPointRatio number Determines the location of the gradient focal point. Valid values are between -1 (left) and 1 (right). 0 (center)
gradientWidth number Determines the width of the gradient tile in pixels. 100
gradientHeight number Determines the height of the gradient tile in pixels. 100
stretchMode string Determines the manner in which the gradient tile is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, and uniformToWidth, and uniformToHeight. fill
alignmentX number Sets the horizontal alignment of the gradient tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number Sets the vertical alignment of the gradient tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the gradient tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
renderTransform matrix Defines the transformation matrix to apply to the final rendered fill. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
fitToDrawing boolean Determines whether the gradient tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false
Gradient stroke brush

The gradientStroke brush paints strokes with a color gradient. For more details on the gradient stroke brush and its brush Flash parameters, go here (for information about gradients) and here (for information about line parameters).

type string Indicates the type of gradient to use. Valid values are linear (where color changes uniformly in a linear direction, vertically, horizontally, or diagonally) and radial (where where color changes in a circular fashion in all directions from a central point to the gradient edge) . linear
colors array<number> The list of hexadecimal color values to use in the gradient. Must be comma-delimited without spaces, and within brackets. No default defined.
alphas array<number> The list of alpha transparency values corresponding to the colors list. Valid values are between 0 (transparent) and 1 (opaque). Must be comma-delimited without spaces, and within brackets. No default defined.
ratios array<number> The list of color distribution ratios corresponding to the colors list (see above). The ratios define the percentage of the gradientWidth where the color is sampled at 100%. Valid values are between 0 (left) and 255 (right). Must be comma-delimited without spaces, and within brackets. No default defined.
spreadMethod string The method to use for spreading the gradient when it is tiled. Valid values are pad (use the terminal colors of the gradient to fill the remainder of the stroke), reflect (reflect the gradient pattern start-to-end, end-to-start, start-to-end, and so on continuously), and repeat (repeat the gradient pattern start-to-end, start-to-end, start-to-end). pad
interpolationMethod string Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb and linearRGB. rgb
focalPointRatio number Determines the location of the gradient focal point. Valid values are between -1 (left) and 1 (right). 0 (center)
thickness number Determines the stroke thickness in pixels. A value of 0 indicates hairline thickness. 0
pixelHinting boolean Indicates whether the stroke should be hinted to full pixels. false
scaleMode string Identifies the stroke scaling mode. Valid values are normal, none, horizontal, and vertical. normal
caps string Determines the type of caps to use at stroke ends. Valid values are none, round, and square. round
joints string Determines the type of joints to use at stroke angles. Valid values are miter, round, and bevel. round
miterLimit number Determines the limit at which miter joints are cut off. The value expresses a factor of the stroke thickness (see above). It is measured in pixels. 3
gradientWidth number Determines the width of the gradient tile in pixels. 100
gradientHeight number Determines the height of the gradient tile in pixels. 100
stretchMode string Determines the manner in which the gradient tile is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, and uniformToWidth, and uniformToHeight. fill
alignmentX number Sets the horizontal alignment of the gradient tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number Sets the vertical alignment of the gradient tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the gradient tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
renderTransform matrix Defines the transformation matrix to apply to the final rendered fill. This is represented as a comma-delimited and bracket-enclosed list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
fitToDrawing boolean Determines whether the gradient tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false
Group brush

The group brush paints with a set of layered brushes simultaneously. For example, you could add outlines around the columns of a column chart by using a group brush consisting of a solidStroke brush on top of a gradientFill brush. Or you could paint with a semi-transparent gradientFill brush on top of an imageFill brush. (Note: To apply these effects to the series in a chart, however, you eventually have to use a brush palette. Depending on what your ultimate goal is, you could put a bunch of custom defined group brushes into a list brush palette, or it may be easier to define a couple of brush palettes and put them into a group brush palette.)

Image fill brush

The imageFill brush fills an area with a JPG, PNG, or GIF image file.

source string The URL of the fill image. No default defined.
repeat boolean Indicates whether the image should be repeated when tiled. Go here for more information about the repeat parameter. true
smooth boolean Indicates whether the image should be smoothed when it is scaled. Go here for more information about the smooth parameter. false
stretchMode string Determines the manner in which the image tile is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, and uniformToWidth, and uniformToHeight. fill
alignmentX number Sets the horizontal alignment of the image tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number Sets the vertical alignment of the image tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the image tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
renderTransform matrix Defines the transformation matrix to apply to the final rendered fill. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
fitToDrawing boolean Determines whether the image tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false
Movie fill brush

The movieFill brush fills an area with a Flash movie (SWF).

source string The URL of the Flash movie. No default defined.
repeat boolean Indicates whether the Flash movie should be repeated when it is tiled. Go here for more information about the repeat parameter. true
smooth boolean Indicates whether the Flash movie should be smoothed when it is scaled. Go here for more information about the smooth parameter. false
stretchMode string Determines the manner in which the Flash movie tile is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, and uniformToWidth, and uniformToHeight. fill
alignmentX number Sets the horizontal alignment of the Flash movie tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number Sets the vertical alignment of the Flash movie tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the Flash movie tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
renderTransform matrix Defines the transformation matrix to apply to the final rendered fill. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
fitToDrawing boolean Determines whether the Flash movie tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false
Solid fill brush

The solidFill brush fills an area with a solid color.

color number The hexadecimal color of the fill. 0x000000 (black)
alpha number The alpha transparency of the fill. Valid values are between 0 (transparent) and 1 (opaque). 1
Solid stroke brush

The solidStroke brush paints strokes with a solid color. Go here for more information about solid stroke parameters.

thickness number Sets the thickness of the stroke in pixels. A value of 0 indicates hairline thickness. 0
color number Determines the hexadecimal color of the stroke brush. 0x000000 (black)
alpha number The alpha transparency of the fill. Valid values are between 0 (transparent) and 1 (opaque). 1
pixelHinting boolean Indicates whether the stroke should be hinted to full pixels. false
scaleMode string Identifies the stroke scaling mode. Valid values are normal, none, horizontal, and vertical. normal
caps string Determines the type of stroke end caps to use. Valid values are none, round, and square. round
joints string Determines the type of joints to use at stroke angles. Valid values are miter, round, and bevel. round
miterLimit number Determines the limit at which miter joints are cut off. The value expresses a factor of the stroke thickness (see above). It is measured in pixels. 3
Video fill brush

The videoFill brush paints fills with video. It supports video files derived from the standard MPEG-4 format, including F4V, MP4, M4A, MOV, MP4V, 3GP, and 3G2 (if they contain H.264 video and/or HEAAC v2 encoded audio.

source string The URL of the video you want to paint with. A Flash Player security limitation requires static video files to be located in the same directory as the SWF file or in a subdirectory.
repeat boolean Indicates whether the video should be repeated when it is tiled. Go here for more information about the repeat parameter. true
smooth boolean Indicates whether the video should be smoothed when it is scaled. Go here for more information about the smooth parameter. false
stretchMode string Determines the manner in which the video is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, and uniformToWidth, and uniformToHeight. fill
alignmentX number Sets the horizontal alignment of the video tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number Sets the vertical alignment of the video tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the video tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
renderTransform matrix Defines the transformation matrix to apply to the final rendered video fill. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
fitToDrawing boolean Determines whether the video tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false

Color palette

Usage: charting.colorPalette.*, charting.colorPaletteDark.*, and so on.

Use color palettes to control the colors used by brush palettes, which in turn are used to paint things like chart lines and series swatches in legends. For example, color palettes map colors to the series in a series index for a brush palette.

If you associate a color palette to a brush palette, then the brush palette uses it to determine the color of each brush it generates. For example, when a brush palette generates a new brush for each series in a chart (to paint a line in a line chart, fill a column in a column chart, or paint a swatch in a chart legend), it uses a color palette to determine the color of those lines, columns, and swatches.

While you can define colors at the individual brush level, this method enables you to set up one set of colors for all of the brushes used in each chart of a dashboard.

For example, a list color palette maps a series index directly to a color from a list of colors defined in the palette. By default, if the series index contains more items than the list of colors in the color palette, it is wrapped around to the beginning of the list, repeating the colors. If most of your charts present 10 series or less, then you might create a color palette with twice that number of specified colors so that colors are repeated very infrequently.

However, the list color palette can be configured to interpolate between the colors in its list, instead of wrapping, to produce a range of colors that span over the total number of series in an index. With this setup, no colors will repeat.

Values

The different kinds of color palettes that you can apply include:

Example

This example provides properties for a new list color palette called "myColorPalette," which interpolates between red, green, and blue:

<option name="charting.myColorPalette">list</option>
<option name="charting.myColorPalette.colors">[0xFF0000,0x00FF00,0x0000FF]</option>
<option name="charting.myColorPalette.interpolate">true</option>

This example references the "myColorPalette" defined above and creates a brighter version of it called "myBriteColorPalette":

<option name="charting.myBriteColorPalette">brightness</option>
<option name="charting.myBriteColorPalette.colorPalette">@myColorPalette</option>
<option name="charting.myBriteColorPalette.brightness">0.5</option>

Used by

The following predefined palette types inherit their properties from colorPalette:

Properties

Brightness

The brightness color palette modifies the brightness of colors generated from another color palette.

Property name Value type Definition Default
colorPalette colorPalette References the color palette to use for base color generation. Reference an existing color palette with the @ symbol: @myColorPalette No default defined. See the colorPalette element for properties and defaults.
brightness number The brightness adjustment to apply to the base color. Valid values are between -1 (darkest) and 1 (brightest). 0 (no brightness change)
List

The list color palette contains the list of color values that should be applied to chart series.

colors array<number> The list of hexadecimal color values from which series colors are generated. Should be comma-delimited, bracket-enclosed, without spaces. No default defined.
interpolate boolean Determines whether Splunk should interpolate between the colors in the color list. When set to true, Splunk will assign a series index for a chart a continuous gradient of colors between each color in the list.

So if you choose red and blue for the colors list and have more than two series in your chart, the first series will be red, the last series will be blue, and the intervening series will be assigned colors on the gradient scale between red and blue. Set interpolate to false to use only the colors in the colors list without intermediate gradients, repeating colors if necessary.
false

Brush palette

Usage: charting.lineBrushPalette.*, charting.myBrushPalette.*, and so on.

Use brush palettes to map a series index to a brush type. The brush palette then generates a brush for each series in that index when Splunk draws the chart. For example, if you are using a solidStroke brush to generate a line for a line chart, you would use a solidStroke brush palette to generate a solidStroke brush, which would in turn paint a solid color for the series (as determined by the associated color palette).

Values

The different kinds of brush palettes that you can apply include:

Example

This example creates a brush palette called myBrushPalette that produces solidFill brushes for an area chart. It references a predefined color palette that is essentially a darker version of the standard palette (colorPaletteDark) and arranges for the solidFill brushes that it generates to be partially transparent.

<option name="charting.myBrushPalette">solidFill</option>
<option name="charting.myBrushPalette.colorPalette">@colorPaletteDark</option>
<option name="charting.myBrushPalette.alpha">0.6</option>

Predefined brush palettes

The following predefined brush palettes inherit their root properties from brushPalette:

You can create other brush palletes of your own.

Properties

Gradient fill brush palette

The gradientFill brush palette generates gradientFill brushes.

Property name Value type Definition Default
type string Indicates the type of gradient to use. Valid values are linear (where color changes uniformly in a linear direction, vertically, horizontally, or diagonally) and radial (where where color changes in a circular fashion in all directions from a central point to the gradient edge) . linear
colorPalettes array<colorPalette> The list of color palettes from which gradient colors are retrieved. Must be comma-delimited without spaces, and within brackets. No default defined. See the colorpalette element for info on parameters and defaults.
alphas array<number> The list of alpha transparency values corresponding to the colorPalettes list (see this parameter above). Valid values are between 0 (transparent) and 1 (opaque). Must be comma-delimited without spaces, and within brackets. No defaults.
ratios array<number> The list of color distribution ratios corresponding to the colorPalettes list (see this parameter above). The ratios define the percentage of the gradientWidth (see below) where the color is sampled at 100%. Valid values are between 0 (left) and 255 (right). Must be comma-delimited without spaces, and within brackets. No default defined.
spreadMethod string The method to use for spreading the gradient when it is tiled. Valid values are pad (use the terminal colors of the gradient to fill the remainder of the region), reflect (reflect the gradient pattern start-to-end, end-to-start, start-to-end, and so on continuously until the region is filled), and repeat (repeat the gradient pattern start-to-end, start-to-end, start-to-end until the region is filled). pad
interpolationMethod string Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb and linearRGB. rgb
focalPointRatio number Determines the location of the gradient focal point. Valid values are between -1 (left) and 1 (right). 0 (center)
gradientWidth number Determines the width of the gradient tile in pixels. 100
gradientHeight number Determines the height of the gradient tile in pixels. 100
stretchMode string Determines the manner in which the gradient tile is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, and uniformToWidth, and uniformToHeight. fill
aligmentX number Sets the horizontal alignment of the gradient tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number Sets the vertical alignment of the gradient tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the gradient tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
renderTransform matrix Defines the transformation matrix to apply to the final rendered fill. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
fitToDrawing boolean Determines whether the gradient tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false
Gradient stroke brush palette

The gradientStroke brush palette generates gradientStroke brushes.

type string Indicates the type of gradient to use. Valid values are linear (where color changes uniformly in a linear direction, vertically, horizontally, or diagonally) and radial (where where color changes in a circular fashion in all directions from a central point to the gradient edge) . linear
colorPalettes array<colorPalette> The list of color palettes from which gradient colors are retrieved. Must be comma-delimited without spaces, and within brackets. No default defined. See the colorPalette element for parameters and defaults.
alphas array<number> The list of alpha transparency values corresponding to the colorPalettes list. Valid values are between 0 (transparent) and 1 (opaque). Must be comma-delimited without spaces, and within brackets. No default defined.
ratios array<number> The list of color distribution ratios corresponding to the colorPalettes list (see above). The ratios define the percentage of the gradientWidth where the color is sampled at 100%. Valid values are between 0 (left) and 255 (right). Must be comma-delimited without spaces, and within brackets. No default defined.
spreadMethod string The method to use for spreading the gradient when it is tiled. Valid values are pad (use the terminal colors of the gradient to fill the remainder of the stroke), reflect (reflect the gradient pattern start-to-end, end-to-start, start-to-end, and so on continuously), and repeat (repeat the gradient pattern start-to-end, start-to-end, start-to-end). pad
interpolationMethod string Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb and linearRGB. rgb
focalPointRatio number Determines the location of the gradient focal point. Valid values are between -1 (left) and 1 (right). 0 (center)
thickness number Determines the stroke thickness in pixels. A value of 0 indicates hairline thickness. 0
pixelHinting boolean Indicates whether the stroke should be hinted to full pixels. false
scaleMode string Identifies the stroke scaling mode. Valid values are normal, none, horizontal, and vertical. normal
caps string Determines the type of caps to use at stroke ends. Valid values are none, round, and square. round
joints string Determines the type of joints to use at stroke angles. Valid values are miter, round, and bevel. round
miterLimit number Determines the limit at which miter joints are cut off. The value expresses a factor of the stroke thickness (see above). It is measured in pixels. 3
gradientWidth number Determines the width of the gradient tile in pixels. 100
gradientHeight number Determines the height of the gradient tile in pixels. 100
stretchMode string Determines the manner in which the gradient tile is stretched relative to the drawing bounds. Valid values are none, fill, uniform, uniformToFill, and uniformToWidth, and uniformToHeight. fill
aligmentX number Sets the horizontal alignment of the gradient tile within the drawing bounds. Typical values are between 0 (left-aligned) and 1 (right-aligned). 0.5 (centered)
alignmentY number Sets the vertical alignment of the gradient tile within the drawing bounds. Typical values are between 0 (top-aligned) and 1 (bottom-aligned). 0.5 (centered)
tileTransform matrix Defines the transformation matrix to apply to the gradient tile. This is represented as a comma-delimited list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
renderTransform matrix Defines the transformation matrix to apply to the final rendered fill. This is represented as a comma-delimited and bracket-enclosed list of six numeric values enclosed in a parenthesis without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined.
fitToDrawing boolean Determines whether the gradient tile should be scaled to the drawing boundaries (true) or to the boundaries of the entire graphics area (false) false
Group brush palette

The group brush palette generates brushes from other brush palettes.

brushPalettes array<brushPalette> The list of brush palettes from which to generate brushes for the group. Should be comma-delimited, bracket-enclosed, without spaces. No default defined. See the brushPalette element for properties and defaults.
List brush palette

The list brush palette provides brushes from a specified list.

brushes array<brush> The list of brushes to choose from. Should be comma-delimited, bracket-enclosed, without spaces. No default defined.
Solid fill brush palette

The solidFill brush palette generates solidFill brushes.

colorPalette colorPalette The color palette from which to retrieve the color of the fill. No default defined. See the colorPalette element for parameters and defaults.
alpha number Determines the alpha transparency of the fill. Valid values are between 0 (transparent) and 1 (opaque). 1
Solid stroke brush palette

The solidStroke generates solidStroke brushes.

thickness number Defines the stroke thickness in pixels. A value of 0 indicates hairline thickness. 0
colorPalette colorPalette Determines the color palette from which to retrieve the colors of the generated solid stroke brushes. 0x000000 (black) (See the colorPalette element for parameters and defaults.)
alpha number Determines the alpha transparency of the stroke. Valid values are between 0 (transparent) and 1 (opaque). 1
pixelHinting boolean Indicates whether the stroke should be hinted to full pixels. false
scaleMode string Identifies the stroke scaling mode. Valid values are normal, none, horizontal, and vertical. normal
caps string Determines the type of stroke end caps to use. Valid values are none, round, and square. round
joints string Determines the type of joints to use at stroke angles. Valid values are miter, round, and bevel. round
miterLimit number Determines the limit at which miter joints are cut off. The value expresses a factor of the stroke thickness (see above). It is measured in pixels. 3

Shape and shape palette

Usage: charting.shape.*

You use shape properties to define shape objects for shape palettes, which are designed primarily to enable the assignation of specific shapes to chart markers. For example, you could arrange for each series in a line chart to have markers of different shapes. To do this you would define a list shape palette that sets up a specific shape object for each series, and then assign that to the markerShapePalette property.

Note: By default the shape properties on charts that can use them are not assigned any value. In the case of no value, most chart types use the rectangle shape. The exception is the bubble chart type, which uses the ellipse shape.

Values

Example

This defines a shape palette that contains ellipses.

<option name="charting.ellipseShapePalette">list</option>
<option name="charting.ellipseShapePalette.shapes">[ellipse]</option>

This assigns the new ellipseShapePalette to a bubble chart.

<option name="charting.chart">bubble</option>
<option name="charting.chart.bubbleShapePalette">@ellipseShapePalette</option>

This creates an "upwards pointing" triangle defined as myShape:

<option name="charting.myShape">triangle</option>
<option name="charting.myShape.p1">(0.5,0)</option>
<option name="charting.myShape.p2">(1,1)</option>
<option name="charting.myShape.p3">(0,1)</option>

Used by

shape objects are referenced in shapePalettes of the list type. Or, to put it another way, shapePalettes are populated by lists of shape objects.

Shape properties

Property name Value type Definition Default
Diamond shape

The diamond shape draws a diamond-shaped parallelogram. It has no additional properties.

Ellipse shape

The ellipse shape draws an ellipse. It has no additional properties.

Group shape

The group shape draws a group of shapes simultaneously.

shapes array<shape> The list of shapes to draw. Should be comma-delimited, bracket-enclosed, without spaces. No default defined. See the shape element for properties and defaults.
brushes array<brush> An optional list of brushes that correspond to each shape in the shapes list No default defined. See the brush element for information about its properties and defaults.
Line shape

The line shape draws a line between two points.

p1 point Sets the starting point of the line in relative coordinates (0 to 1. Presented as a comma delimited list of two numeric values (corresponding to x and y, respectively) enclosed in parenthesis, without spaces. (0,0.5)
p2 point Sets the ending point of the line in relative coordinates (0 to 1. Presented as a comma delimited list of two numeric values (corresponding to x and y, respectively) enclosed in parenthesis, without spaces. (0,0.5)
Polygon shape

The polygon shape draws a polygon.

vertices array<point> A list of points that define the polygon. Each point is presented as a comma delimited list of two numeric values (corresponding to x and y, respectively) enclosed in parenthesis, without spaces. These parenthesis-enclosed points should then be in a comma-delimited list without spaces and enclosed within brackets. These arrays currently cannot contain other items that are arrays or other lists of values (such as points, matrices, and so on). For more information about vertices and its limitations, see the subtopic "Limitations of the vertices parameter," below. No default defined.
Rectangle shape

The rectangle shape draws a rectangle. It has no properties.

Triangle shape

The triangle shape draws a triangle.

p1 point Sets the first point of the triangle in relative coordinates (0 to 1. Presented as a comma delimited list of two numeric values (corresponding to x and y, respectively) enclosed in parenthesis, without spaces. (0.5, 0)
p2 point Sets the second point of the triangle in relative coordinates (0 to 1. Presented as a comma delimited list of two numeric values (corresponding to x and y, respectively) enclosed in parenthesis, without spaces. (1,1)
p3 point Sets the third point of the triangle in relative coordinates (0 to 1. Presented as a comma delimited list of two numeric values (corresponding to x and y, respectively) enclosed in parenthesis, without spaces. (0,1)
shape shape Indicates the shape to constrain to a uniform size, such as a defined rectangle, triangle, or polygon. No default defined.
Wedge shape

The wedge shape draws a portion of a circle.

startAngle number Indicates the start angle of the wedge in degrees. 0
arcAngle number Indicates the arc (end) angle of the wedge in degrees. 360

Limitations of the vertices parameter

The vertices parameter (for polygon shapes) uses an array to indicate the list of points that make up a polygon shape. It's important to note, however, that these arrays currently cannot contain other items that are arrays or other lists of values, such as points, matrices, and so on. For example, the following won't work:

<option name="charting.myShape">polygon</option>
<option name="charting.myShape.vertices">[(0,1),(1,1),(1,0)]</option>

Instead, you can define each point separately and reference them in the array:

<option name="charting.myP1">(0,1)</option>
<option name="charting.myP2">(1,1)</option>
<option name="charting.myP3">(1,0)</option>
<option name="charting.myShape">polygon</option>
<option name="charting.myShape.vertices">[@myP1,@myP2,@myP3]</option>

This is a limitation that should be resolved in a future Splunk release.

Shape palette properties

There are two types of shape palettes: group palettes and list shape palettes.

Property name Value type Definition Default
Group shape palette

The group shape palette generates group shapes from other shape palettes.

shapePalettes array<shapePalette> The list of shape palettes from which to retrieve shapes for the group. Should be comma-delimited, bracket-enclosed, without spaces. No default defined.
List shape palette

The list shape provides shapes from a specified list.

shapes array<shape> The list of shapes to choose from. Should be comma-delimited, bracket-enclosed, without spaces. No default defined. For more information about shape types, parameters, and defaults, see the shape element table.

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!