Splunk® Enterprise

Developing Dashboards, Views, and Apps for Splunk Web

Download manual as PDF

Splunk version 4.x reached its End of Life on October 1, 2013. Please see the migration information.
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Download topic as PDF

Advanced configuration - textBlock, layoutSprite, and sprite properties

textBlock, layoutSprite, and sprite are core elements that control property sets that are inherited and/or used by elements that are higher up in the flash charting hierarchy. In most cases you probably won't need to change their defaults, but it really depends on what you hope to achieve with your charts.


Text block

Usage: charting.textBlock.*

The textBlock element controls text display in legend and axis labels as well as axis title and message text.

Values

  • textBlock

Used by

The textBlock element is referred to by:

In addition, the axisTitle element inherits all of its properties from textBlock save one (placement).

Text block properties

The textBlock element controls formatting properties for text in chart labels and messages
Property name Value type Definition Default Supported by JSChart?
text string The raw text to display. (For HTML formatted text, see the htmlText property.) No text by default. No
textColor number The hexadecimal color value of the text. 0x000000 (black) No
defaultTextFormat textFormat The format to apply to the text. Arranged as a comma-delimited list of property name/value pairs, enclosed in curly braces. For details (and defaults) see the "Text format properties" subtopic, below. See below. No
htmlText string The HTML-formatted text to display. (For raw text, see the text property.) No text by default. No
condenseWhite boolean Determines whether white space should be condensed for HTML-formatted text. Used in conjunction with htmlText. false No
wordWrap boolean Determines whether to wrap long lines of text to the next line. false No
overflowMode string Determines the manner in which inline text that overflows layout bounds is handled. Valid values are default, ellipsisMiddle (cuts off the text at the middle of the line, halfway to the layout boundary, and adds an ellipsis to indicate continuation), and ellipsisEnd (cuts off the overflowing text at the layout boundary and adds an ellipsis to indicate continuation). default Yes, but for legend items only.
useBitmapRendering boolean Indicates whether to render text as a bitmap. Bitmap rendering enables you to apply effects, such as alpha transparency and rotation transforms to the text. false No
useBitmapSmoothing boolean Determines whether a smoothing algorithm should be applied to the text when you set useBitmapRendering to true. false No
bitmapSmoothingSharpness number When you are working with text and useBitmapRendering and useBitmapSmoothing are both set to true, this enables you to set the sharpness of the smoothing algorithm. Valid values are between 1 (low) and 8 (high). 3 No
bitmapSmoothingQuality number When you are working with text and useBitmapRendering and useBitmapSmoothing are both set to true, this enables you to set the quality of the smoothing algorithm. Valid values are between 0 (low) and 15 (high). 1 No

Text format properties

When you work with chart text blocks, there are default text formatting properties that determine basic format aspects like alignment, color, font, indentation, italicization, and so on. You use the defaultTextFormat property to change the default text format of text blocks.

This table presents the properties and default values for defaultTextFormat. To specify a new set of defaults for defaultTextFormat, provide the changes in the form of a comma-delimited list of text formatting property/value pairs, without spaces and enclosed in brackets, like so:

{prop1:value1,prop2:value2,...,propN:valueN}
These are the properties and defaults for defaultTextFormat.
Property name Value type Definition Default Supported by JSChart?
align string Controls text alignment. Valid values are center, justify, left, and right. left No
blockindent number Controls the amount of text block indentation in terms of pixels. 0 No
bold boolean Controls whether the text is bold or not. false No
bullet boolean Controls whether the text is bulleted or not. false No
color number Determines the color of the text, as expressed in hexadecimal values. 0x000000 (black) No
font string 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
indent number Controls the indentation from the left margin to the first character in a paragraph, in pixels. 0 No
italic boolean Controls whether the text is italicized or not. false No
kerning boolean Determines whether text kerning is enabled. false No
leading number Determines the amount of vertical space between lines, in pixels. 0 No
leftMargin number Controls the left margin of the paragraph, in pixels. 0 No
letterSpacing number Controls the amount of space that is uniformly distributed between all characters. 0 No
rightMargin number Controls the right margin of the paragraph, in pixels 0 No
size number Controls the point size of the text. 12 No
underline boolean Determines whether the text is underlined or not. false No

Layout sprite

Usage: charting.layoutSprite.*

The layoutSprite element is the base for all visual elements in Splunk charts that require advanced layout management. It has its own properties and inherits root properties from sprite.

Values

  • layoutSprite

Used by

All values of the following elements have layoutSprite properties, along with their own individual properties:

In addition, the legend element uses layoutSprite.

Properties

layoutSprite elements are the base for all charting elements that require advanced layout management. They inherit properties from sprite and have the following additional properties.
Property name Value type Definition Default Supported by JSChart?
visibility string Controls the sprite visibility mode. Valid values are visible (sprite element is displayed), hidden (sprite element is hidden, but layout space is reserved for it), and collapsed (sprite element is hidden, and space is not reserved for it in the layout). visible No
clip boolean Determines whether the sprite portions that fall outside its layout bounds are clipped. false No
snap boolean Determines whether to snap the sprite to whole pixels. false No
minimumWidth number The minimum allowable width of the sprite, in pixels. 0 No
minimumHeight number The minimum allowable height of the sprite, in pixels. 0 No
maximumWidth number The maximum allowable width of the sprite, in pixels. Infinity No
maximumHeight number The maximum allowable height of the sprite, in pixels. Infinity No
margin margin The margin to place around the sprite, in pixels. Should be represented as four comma-separated integers within parentheses and without spaces, representing left, right, top, and bottom, respectively (0,0,0,0) No
alignmentX number The horizontal alignment of the sprite within its layout bounds. Valid values are between 0 (left aligned) and 1 (right aligned). auto No
alignmentY number The vertical alignment of the sprite within its layout bounds. Valid values are between 0 (top aligned) and 1 (bottom aligned). auto No
layoutTransform matrix Defines the transformation matrix to apply to the sprite before layout. This is represented as a comma-delimited list of six numeric values enclosed within parentheses and without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). 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 within parentheses and without spaces, corresponding to a, b, c, d, tx, and ty respectively: (a,b,c,d,tx,ty). No default defined. No
renderTransformOrigin point The origin, or anchor point, of the renderTransform. A point is represented by two integers representing x and y coordinates respectively, comma-separated within parentheses and without spaces. (0,0) No
renderTransformOriginMode string The coordinate mode of the RenderTransformOrigin. Valid values are relative (indicating coordinates are between 0 and 1) and absolute (indicating coordinates are in pixels). relative No

Sprite

sprite is the base visual element for Splunk charts. It provides properties to the layoutSprite element, and also provides properties to visual elements in each chart type.

Values

  • sprite

Used by

Properties

The sprite element provides root properties for several charting elements.
Property name Value type Definition Default Supported by JSChart?
x number The x position of the sprite in its parent container. 0 No
y number The y position of the sprite in its parent container. 0 No
width number The width of the sprite in pixels. auto No
height number The height of the sprite in pixels. auto No
scaleX number The x scale of the sprite. 1 No
scaleY number The y scale of the sprite. 1 No
rotation number The rotation of the sprite in degrees. 1 No
alpha number The alpha transparency of the sprite. Valid values are between 0 (transparent) and 1 (opaque). 1 No
visible boolean Determines whether the sprite is visible or not. true No
blendMode string Determines the blend mode to apply to the sprite. The blend mode affects how an object looks in relation to the objects around or underneath it. This is achieved by varying the transparency or color of the blended object. Valid values include:add, alpha, darken, difference, erase, hardlight, invert, layer, lighten, multiply, normal, overlay, screen, subtract. For more information, see this discussion of Flash blend modes. normal No
PREVIOUS
Advanced configuration - Layout and data table properties
 

This documentation applies to the following versions of Splunk® Enterprise: 4.3, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7


Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

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

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters