
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 "Chart customization," 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:
<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: If you want to apply static colors to specific fields we suggest you use the fieldColors
property (see documentation of the fields
color palette, below).
Font properties
Font properties The following properties enable you to set basic font characteristics. | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
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 |
No |
fontSize |
number | Identifies the font size in pixels. For example, choose 14 to have a 14px font size. |
11 |
No |
fontColor |
number | Uses a hexadecimal value to define the font color. | 0x000000 (black) |
No |
Color properties
Color properties The following properties enable you to set basic color characteristics. | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
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) |
No |
backgroundColor |
number | Controls the color of the background of the flash chart area. Uses a hexadecimal value to define the color. | 0xFFFFFF (white) |
No |
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 Chart colors.If you want to apply static colors to specific fields we suggest you use the fieldColors property (see documentation of the fields color palette, below). |
[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] |
Yes, as long you specify colors as hexadecimal numbers. Splunk will parse them to a number until an illegal character or the end of the string is found (so 0x00ff and 0x00ffww are equivalent to 0x0000ff). Splunk will render colors that cannot be parsed at all as black. |
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:
cameraFill
dashedStroke
gradientFill
gradientStroke
group
imageFill
movieFill
solidFill
solidStroke
videoFill
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
:
backgroundBrush
- paints the chart background
chart objects:
innerFillBrush
- paints the inner fill of range marker chartslabelLineBrush
- paints pie chart and ratio bar chart label lineslineBrush
- paints range marker and value marker chart linesouterFillBrush
- paints the outer fill of range marker charts
axis label objects:
axisBrush
- paints the line that runs the length of the axismajorTickBrush
- paints the major tick marks along the axisminorTickBrush
- paints the minor tick marks along the axis
grid line objects:
majorLineBrush
- paints the major grid lines (corresponds with major tick marks)minorLineBrush
- paints the minor grid lines (corresponds with minor tick marks)
Camera fill brush properties
Camera fill brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
cameraIndex |
number | The zero-based index of the camera to use if multiple cameras are available. | auto |
No |
repeat |
boolean | Determines whether the image should be repeated when it is tiled. Go here for more information about the repeat parameter. |
false |
No |
smooth |
boolean | Determines whether the image is smoothed when it is scaled. Go here for more information about the repeat parameter. |
false |
No |
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 |
No |
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) |
No |
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) |
No |
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. You must set this value. | No |
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) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. You must set this value. | No |
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 |
No |
Dashed stroke brush properties
Dashed stroke brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
dashSize |
number | Determines the size of each dash in pixels. | 4 |
No |
dashSpacing |
number | Sets the size of the spaces between each dash in pixels. | 4 |
No |
thickness |
number | Determines the thickness of the stroke in pixels. A value of 0 indicates hairline thickness. |
0 |
No |
color |
number | Determines the hexadecimal color of the stroke. | 0x000000 (black) |
No |
alpha |
number | Sets the alpha transparency of the stroke. Valid values are between 0 (transparent) and 1 (opaque). |
1 |
No |
pixelHinting |
boolean | Indicates whether the stroke should be hinted to full pixels. | false |
No |
scaleMode |
string | Identifies the stroke scaling mode. Valid values are normal , none , horizontal , and vertical . |
normal |
No |
caps |
string | Determines the type of stroke end caps to use. Valid values are none , round , and square . |
round |
No |
joints |
string | Determines the type of joints to use at stroke angles. Valid values are miter , round , and bevel . |
round |
No |
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 |
No |
Gradient fill brush properties
Gradient fill brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
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 |
No |
colors |
array<number> | Defines the list of hexadecimal color values to use in the gradient. Must be comma-delimited 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. | No |
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 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. | No |
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 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. | No |
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 |
No |
interpolationMethod |
string | Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb and linearRGB . |
rgb |
No |
focalPointRatio |
number | Determines the location of the gradient focal point. Valid values are between -1 (left) and 1 (right). |
0 (center) |
No |
gradientWidth |
number | Determines the width of the gradient tile in pixels. | 100 |
No |
gradientHeight |
number | Determines the height of the gradient tile in pixels. | 100 |
No |
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 |
No |
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) |
No |
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) |
No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 |
No |
Gradient stroke brush properties
Gradient stroke brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
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 |
No |
colors |
array<number> | The list of hexadecimal color values to use in the gradient. Must be comma-delimited and within brackets. | No default defined. | No |
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 and bracket-enclosed. |
No default defined. | No |
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 and bracket-enclosed. |
No default defined. | No |
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 |
No |
interpolationMethod |
string | Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb and linearRGB . |
rgb |
No |
focalPointRatio |
number | Determines the location of the gradient focal point. Valid values are between -1 (left) and 1 (right). |
0 (center) |
No |
thickness |
number | Determines the stroke thickness in pixels. A value of 0 indicates hairline thickness. |
0 |
No |
pixelHinting |
boolean | Indicates whether the stroke should be hinted to full pixels. | false |
No |
scaleMode |
string | Identifies the stroke scaling mode. Valid values are normal , none , horizontal , and vertical . |
normal |
No |
caps |
string | Determines the type of caps to use at stroke ends. Valid values are none , round , and square . |
round |
No |
joints |
string | Determines the type of joints to use at stroke angles. Valid values are miter , round , and bevel . |
round |
No |
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 |
No |
gradientWidth |
number | Determines the width of the gradient tile in pixels. | 100 |
No |
gradientHeight |
number | Determines the height of the gradient tile in pixels. | 100 |
No |
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 |
No |
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) |
No |
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) |
No |
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 |
No |
Group brush properties
Group brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
brushes |
array<brush> | The list of brushes to paint with. Must be comma-delimited and bracket-enclosed. | No default defined. | No |
Image fill brush properties
Image fill brush The | ||||
source |
string | The URL of the fill image. | No default defined. | No |
repeat |
boolean | Indicates whether the image should be repeated when tiled. Go here for more information about the repeat parameter. |
false |
No |
smooth |
boolean | Indicates whether the image should be smoothed when it is scaled. Go here for more information about the smooth parameter. |
false |
No |
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 |
No |
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) |
No |
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) |
No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 |
No |
Movie fill brush properties
Movie fill brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
source |
string | The URL of the Flash movie. | No default defined. | No |
repeat |
boolean | Indicates whether the Flash movie should be repeated when it is tiled. Go here for more information about the repeat parameter. |
false |
No |
smooth |
boolean | Indicates whether the Flash movie should be smoothed when it is scaled. Go here for more information about the smooth parameter. |
false |
No |
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 |
No |
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) |
No |
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) |
No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 |
No |
Solid fill brush properties
Solid fill brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
color |
number | The hexadecimal color of the fill. | 0x000000 (black) |
No |
alpha |
number | The alpha transparency of the fill. Valid values are between 0 (transparent) and 1 (opaque). |
1 |
No |
Solid stroke brush properties
Solid stroke brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
thickness |
number | Sets the thickness of the stroke in pixels. A value of 0 indicates hairline thickness. |
0 |
No |
color |
number | Determines the hexadecimal color of the stroke brush. | 0x000000 (black) |
No |
alpha |
number | The alpha transparency of the fill. Valid values are between 0 (transparent) and 1 (opaque). |
1 |
No |
pixelHinting |
boolean | Indicates whether the stroke should be hinted to full pixels. | false |
No |
scaleMode |
string | Identifies the stroke scaling mode. Valid values are normal , none , horizontal , and vertical . |
normal |
No |
caps |
string | Determines the type of stroke end caps to use. Valid values are none , round , and square . |
round |
No |
joints |
string | Determines the type of joints to use at stroke angles. Valid values are miter , round , and bevel . |
round |
No |
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 |
No |
Video fill brush properties
Video fill brush The | ||||
Property name | Value type | Definition | Default | Supported by JSChart? |
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. | No |
repeat |
boolean | Indicates whether the video should be repeated when it is tiled. Go here for more information about the repeat parameter. |
false |
No |
smooth |
boolean | Indicates whether the video should be smoothed when it is scaled. Go here for more information about the smooth parameter. |
false |
No |
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 |
No |
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) |
No |
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) |
No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty) .The resulting transformation matrix object is a 3x3 matrix with the following contents: |
No default defined. | No |
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 |
No |
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:
brightness
- modifies the brightness of colors generated from another color palettefield
- provides colors from a specified field-->color maplist
- generates brush colors from a specified list of colorsrandom</color> - generates random colors
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>
And finally, this example uses the fieldColors
parameter of the field
color palette type to map specific colors to specific fields:
<option name="charting.fieldColors">{"UserIP":0x3399CC, "Referrer_URL":0x00F66, "Browser":0xFFFF33,"SKU":0xFF0000}</option>
Note: If you want to apply static colors to specific fields we suggest you use the fieldColors
property (see documentation of the fields
color palette type, below). For more information about using fieldColors
, see Chart colors.
Used by
The following predefined palette types inherit their properties from colorPalette
:
colorPalette
- defines the standard range of colors used for series indexes in Splunk. charts.
colorPaletteDark
- defines a range of colors that is the same as that of colorPalette
, except darker.
Brightness color palette properties
Brightness
The brightness
color palette modifies the brightness of colors generated from another color palette.
Property name
Value type
Definition
Default
Supported by JSChart?
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.
No
brightness
number
The brightness adjustment to apply to the base color. Valid values are between -1
(darkest) and 1
(brightest).
0
(no brightness change)
No
Field color palette properties
Field
The field
color palette provides colors from a specified color-->field map.
Property name
Value type
Definition
Default
Supported by JSChart?
fieldColors
map<number>
The map of hexadecimal color values to use for each field. A map is a comma-delimited list of key/value pairs, enclosed in curly braces. Keys are separated from their values by a colon. Example: {key1:value1,key2:value2,…,keyN:valueN}
. If a key or string value in the map contains any of these special characters - []{}(),:"
- the special character should be surrounded by double quotes. Existing double quotes or backslashes should be escaped with a preceding backslash.
Note: For more information about using fieldColors
, see Chart colors.
No default specified.
No
defaultColorPalette
colorPalette
The color palette to use for unspecified fields.
No default specified.
No
List color palette properties
List
The list
color palette contains the list of color values that should be applied to chart series.
Property name
Value type
Definition
Default
Supported by JSChart?
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.
No
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
No
Random color palette properties
Random
The random
color palette generates random colors.
Property name
Value type
Definition
Default
Supported by JSChart?
minimumColor
number
The minimum (darkest) hexadecimal color value to generate.
0x000000
No
maximumColor
number
The maximum (lightest) hexadecimal color value to generate
0xFFFFFF
No
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:
field
- provides brushes from a specified field->brush mapping.
fieldImageFill
generates imageFill
brushes based on field name.
gradientFill
- generates gradientFill
brushes
gradientStroke
- generates gradientStroke
brushes
group
- generates group
brushes from other brush palettes
imageFill
- generates imageFill
brushes from a list of source URLs.
listbp
- provides brushes from a specified list
solidFill
- generates solidFill
brushes
solidStroke
- generates solidStroke
brushes
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
:
- fillBrushPalette - generates brushes for color fills in charts, such as the
solidFill
brush
- lineBrushPalette - generates brushes for lines in charts, such as the
solidStroke
- barBrushPalette - generates brushes for bar charts
You can create other brush palletes of your own.
Field brush palette properties
Field brush palette
The field
brush palette provides brushes from a specified brush->field map.
Property name
Value type
Definition
Default
Supported by JSChart?
fieldBrushes
map<brush>
The map of brushes to use for each field. A map is a comma-delimited list of key/value pairs, enclosed in curly braces. Keys are separated from their values by a colon. Example: {key1:value1,key2:value2,…,keyN:valueN}
. If a key or string value in the map contains any of these special characters - []{}(),:"
- the special character should be surrounded by double quotes. Existing double quotes or backslashes should be escaped with a preceding backslash.
No default specified.
No
defaultBrushPalette
BrushPalette
No default specified.
No
Field image fill brush palette properties
Field image fill brush palette
The fieldImageFill
brush palette generates imageFill
brushes based on field name.
Property name
Value type
Definition
Default
Supported by JSChart?
fieldSources
map<string>
The explicit map of image source URLs for each field. The final URL used for each image is sourcePath + fieldSources[field] + sourceExtension
. A map is a comma-delimited list of key/value pairs, enclosed in curly braces. Keys are separated from their values by a colon. Example: {key1:value1,key2:value2,…,keyN:valueN}
. If a key or string value in the map contains any of these special characters - []{}(),:"
- the special character should be surrounded by double quotes. Existing double quotes or backslashes should be escaped with a preceding backslash.
No default specified.
No
sourcePath
<string>
The common path shared among all image sources. This value is prepended to all source URLs.
No default specified.
No
sourceExtension
<string>
The common file extension shared among all image sources. This value is appended to all source URLs.
No default specified.
No
useFieldAsSource
boolean
Indicates whether to use the field name itself to construct each image source URL. When set to true
, any fields that have not been assigned an image source in fieldSources
will use the URL-encoded field name as the source. The final URL used for each image is sourcePath + fieldSources[field] + sourceExtension
.
false
No
repeat
boolean
Indicates whether to repeat the image when it is tiled. Go here for more information about the repeat
parameter.
false
No
smooth
boolean
Indicates whether the image should be smoothed when it is scaled. Go here for more information about the smooth
parameter.
false
No
stretchMode
string
Indicates how to stretch the image tile relative to the drawing bounds. Valid values are none
, fill
, uniform
, uniformToFill
, uniformToWidth
and uniformToHeight
.
fill
No
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)
No
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)
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
. This produces a 3x3 transformation matrix object.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
. This produces a 3x3 transformation matrix object.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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
).
No
defaultBrushPalette
brush palette
The brush palette to use for unspecified fields when useFieldAsSource
is set to false
.
No default specified.
No
Gradient fill brush palette properties
Gradient fill brush palette
The gradientFill
brush palette generates gradientFill
brushes.
Property name
Value type
Definition
Default
Supported by JSChart?
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
No
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.
No
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 and bracket-enclosed.
No defaults.
No
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 and bracket-enclosed.
No default defined.
No
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
No
interpolationMethod
string
Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb
and linearRGB
.
rgb
No
focalPointRatio
number
Determines the location of the gradient focal point. Valid values are between -1
(left) and 1
(right).
0
(center)
No
gradientWidth
number
Determines the width of the gradient tile in pixels.
100
No
gradientHeight
number
Determines the height of the gradient tile in pixels.
100
No
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
No
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)
No
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)
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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
No
Gradient stroke brush palette properties
Gradient stroke brush palette
The gradientStroke
brush palette generates gradientStroke
brushes.
Property name
Value type
Definition
Default
Supported by JSChart?
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
No
colorPalettes
array<colorPalette>
The list of color palettes from which gradient colors are retrieved. Should be comma-delimited and bracket-enclosed.
No default defined. See the colorPalette
element for parameters and defaults.
No
alphas
array<number>
The list of alpha transparency values corresponding to the colorPalettes
list. Valid values are between 0
(transparent) and 1
(opaque). Should be comma-delimited and bracket-enclosed.
No default defined.
No
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). Should be comma-delimited and bracket-enclosed.
No default defined.
No
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
No
interpolationMethod
string
Determines the method to use for interpolating between the colors in the gradient. Valid values are rgb
and linearRGB
.
rgb
No
focalPointRatio
number
Determines the location of the gradient focal point. Valid values are between -1
(left) and 1
(right).
0
(center)
No
thickness
number
Determines the stroke thickness in pixels. A value of 0
indicates hairline thickness.
0
No
pixelHinting
boolean
Indicates whether the stroke should be hinted to full pixels.
false
No
scaleMode
string
Identifies the stroke scaling mode. Valid values are normal
, none
, horizontal
, and vertical
.
normal
No
caps
string
Determines the type of caps to use at stroke ends. Valid values are none
, round
, and square
.
round
No
joints
string
Determines the type of joints to use at stroke angles. Valid values are miter
, round
, and bevel
.
round
No
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
No
gradientWidth
number
Determines the width of the gradient tile in pixels.
100
No
gradientHeight
number
Determines the height of the gradient tile in pixels.
100
No
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
No
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)
No
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)
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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
No
Group brush palette properties
Group brush palette
The group
brush palette generates brushes from other brush palettes.
Property name
Value type
Definition
Default
Supported by JSChart?
brushPalettes
array<brushPalette>
The list of brush palettes from which to generate brushes for the group. Should be comma-delimited and bracket-enclosed.
No default defined. See the brushPalette
element for properties and defaults.
No
Image fill brush palette properties
Image fill brush palette
The imageFill
brush palette generates imageFill
brushes from a list of source URLs.
sources
array<string>
The list of image source URLs to choose from. The final URL used for each image is sourcePath+sources[i]
. Should be comma-delimited and bracket-enclosed.
No default specified.
No
sourcePath
string
The common filepath shared among all image sources. The sourcePath
value is prepended to all source URLs.
No default specified.
No
repeat
boolean
Determines whether to repeat the image when it is tiled. Go here for more information about the repeat
parameter.
false
No
smooth
boolean
Determines whether to smooth the image when it is scaled.
false
No
stretchMode
string
The mode to use for stretching the tile relative to the drawing bounds. Valid values are none
, fill
, uniform
, uniformToFill
, uniformToWidth
and uniformToHeight
.
fill
No
alignmentX
number
The horizontal alignment of the image tile within its drawing bounds. Typical values are between 0
(left aligned) and 1
(right aligned).
0.5
(centered)
No
alignmentY
number
Typical values are between 0
(top-aligned) and 1
(bottom-aligned).
0.5
(centered)
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty)
.
The resulting transformation matrix object is a 3x3 matrix with the following contents:
[ a c tx ]
[ b d ty ]
[ 0 0 1 ]
No default defined.
No
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
No
List brush palette properties
List brush palette
The list
brush palette provides brushes from a specified list.
Property name
Value type
Definition
Default
Supported by JSChart?
brushes
array<brush>
The list of brushes to choose from. Should be comma-delimitedShould be comma-delimited and bracket-enclosed.
No default defined.
No
Solid fill brush palette properties
Solid fill brush palette
The solidFill
brush palette generates solidFill
brushes.
Property name
Value type
Definition
Default
Supported by JSChart?
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.
No
alpha
number
Determines the alpha transparency of the fill. Valid values are between 0
(transparent) and 1
(opaque).
1
No
Solid stroke brush palette properties
Solid stroke brush palette
The solidStroke
generates solidStroke
brushes.
Property name
Value type
Definition
Default
Supported by JSChart?
thickness
number
Defines the stroke thickness in pixels. A value of 0
indicates hairline thickness.
0
No
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.)
No
alpha
number
Determines the alpha transparency of the stroke. Valid values are between 0
(transparent) and 1
(opaque).
1
No
pixelHinting
boolean
Indicates whether the stroke should be hinted to full pixels.
false
No
scaleMode
string
Identifies the stroke scaling mode. Valid values are normal
, none
, horizontal
, and vertical
.
normal
No
caps
string
Determines the type of stroke end caps to use. Valid values are none
, round
, and square
.
round
No
joints
string
Determines the type of joints to use at stroke angles. Valid values are miter
, round
, and bevel
.
round
No
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
No
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.
Diamond shape properties
Diamond shape
The diamond
shape draws a diamond-shaped parallelogram.
Property name
Value type
Definition
Default
Supported by JSChart?
snap
boolean
Indicates whether to snap the shape to whole pixels.
false
No
Ellipse shape properties
Ellipse shape
The ellipse
shape draws an ellipse.
Property name
Value type
Definition
Default
Supported by JSChart?
snap
boolean
Indicates whether to snap the shape to whole pixels.
false
No
Group shape properties
Group shape
The group
shape draws a group of shapes simultaneously.
Property name
Value type
Definition
Default
Supported by JSChart?
shapes
array<shape>
The list of shapes to draw. Should be comma-delimited and bracket-enclosed.
If a key or string value in the map contains any of these special characters - []{}(),:"
- the special character should be surrounded by double quotes. Existing double quotes or backslashes should be escaped with a preceding backslash.
No default defined. See the shape
element for properties and defaults.
No
brushes
array<brush>
An optional list of brushes that correspond to each shape in the shapes
list. Should be comma-delimited and bracket-enclosed.
If a key or string value in the map contains any of these special characters - []{}(),:"
- the special character should be surrounded by double quotes. Existing double quotes or backslashes should be escaped with a preceding backslash.
No default defined. See the brush
element for information about its properties and defaults.
No
Line shape properties
Line shape
The line
shape draws a line between two points.
Property name
Value type
Definition
Default
Supported by JSChart?
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.
(0,0.5)
No
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.
(0,0.5)
No
snap
boolean
Indicates whether to snap the shape to whole pixels.
false
No
Polygon shape properties
Polygon shape
The polygon
shape draws a polygon.
Property name
Value type
Definition
Default
Supported by JSChart?
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. These parenthesis-enclosed points should then be in a comma-delimited list and enclosed within brackets. These arrays can contain other items that are arrays or nested lists of values such as points, matrices, and so on. For example, you could use [(0,1),(1,1),(1,0)]
to describe a set of vertices.
If a key or string value in the map contains any of these special characters - []{}(),:"
- the special character should be surrounded by double quotes. Existing double quotes or backslashes should be escaped with a preceding backslash.
No default defined.
No
snap
boolean
Indicates whether to snap the shape to whole pixels.
false
No
Rectangle shape properties
Rectangle shape
The rectangle
shape draws a rectangle.
Property name
Value type
Definition
Default
Supported by JSChart?
snap
boolean
Indicates whether to snap the shape to whole pixels.
false
No
Triangle shape properties
Triangle shape
The triangle
shape draws a triangle.
Property name
Value type
Definition
Default
Supported by JSChart?
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)
No
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)
No
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)
No
snap
boolean
Indicates whether to snap the shape to whole pixels.
false
No
Wedge shape properties
Wedge shape
The wedge
shape draws a portion of a circle.
Property name
Value type
Definition
Default
Supported by JSChart?
startAngle
number
Indicates the start angle of the wedge in degrees.
0
No
arcAngle
number
Indicates the arc (end) angle of the wedge in degrees.
360
No
snap
boolean
Indicates whether to snap the shape to whole pixels.
false
No
Field shape palette properties
Field shape palette
The field
shape palette provides shapes from a specified field-->shape mapping.
Property name
Value type
Definition
Default
Supported by JSChart?
fieldShapes
map<shapePalette>
A field/shape mapping. A map is a comma-delimited list of key/value pairs, enclosed in curly braces. Keys are separated from their values by a colon. Example: {key1:value1,key2:value2,…,keyN:valueN}
.
If a key or string value in the map contains any of these special characters - []{}(),:"
- the special character should be surrounded by double quotes. Existing double quotes or backslashes should be escaped with a preceding backslash.
No default specified.
No
defaultShapePalette
shapePalette
The shape palette to use for unspecified fields.
No default specified.
No
Group shape palette properties
Group shape palette
The group
shape palette generates group
shapes from other shape palettes.
Property name
Value type
Definition
Default
Supported by JSChart?
shapePalettes
array<shapePalette>
The list of shape palettes from which to retrieve shapes for the group. Should be comma-delimited and bracket-enclosed.
No default defined.
No
List shape palette properties
List shape palette
The list
shape provides shapes from a specified list.
Property name
Value type
Definition
Default
Supported by JSChart?
shapes
array<shape>
The list of shapes to choose from. Should be comma-delimited and bracket-enclosed.
No default defined. For more information about shape types, parameters, and defaults, see the shape
element table.
No
PREVIOUS Tooltip properties |
NEXT Advanced configuration - Layout and data table properties |
This documentation applies to the following versions of Splunk® Enterprise: 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.14, 6.0.15, 6.1, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 6.1.7, 6.1.8, 6.1.9, 6.1.10, 6.1.11, 6.1.12, 6.1.13, 6.1.14, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9, 6.2.10, 6.2.11, 6.2.12, 6.2.13, 6.2.14, 6.2.15
Feedback submitted, thanks!