Overview of the custom chart configuration reference
We've designed the default look and feel of Splunk charts to combine simplicity of design with strong usability. We want you to be able to easily generate your charts, incorporate them into dashboards, and share them with interested parties without needing to spend time "tinkering under the hood" to make things look just right.
But we also understand that the default chart design options in the Panel Editor won't fit everyone's needs all of the time. This is why we've also made it possible for you to customize just about every aspect of the charting UI, from the choice of chart colors, fonts, and line thicknesses to the formatting of legends and axis labels and controlling the way chart elements are laid out in the dashboard panel. All you have to do is adjust the properties for the charting elements in the underlying panel XML.
The topics in this reference chapter provide details on the various charting elements and properties that you can use to customize just about every aspect of your dashboard charts. Use this reference to customize charts whether they are built using the simplified or advanced dashboard XML. (For more information about the two kinds of XML, see "About Advanced XML" in the Developing Views and Apps for Splunk Web manual.)
Chart customization introduction and tutorial
While the topics in this reference chapter provide numerous small examples of how chart customization can be managed in simple dashboard XML with the Splunk charting controls, elsewhere in this manual you can find a comprehensive introduction to advanced chart customization. It includes:
- longer and more detailed chart customization examples, with some additional background on how they work.
- coverage of the slight syntax differences for chart customization in simple and advanced view XML.
Note: Certain chart customization properties are not supported by JSChart. If you use one of these unsupported chart customization properties in a dashboard chart, different things will happen depending on whether the chart is based on simple or advanced XML and whether or not you are viewing the chart with an iOS mobile device. In some cases the chart is rendered with FlashChart; in others Splunk just renders the chart with JSChart, ignoring the unsupported customizations.
Each of the tables in this charting library reference has a Supported by JSChart? column--check it to see if the chart library properties you intend to use are supported or not.
For detailed information about what happens when you use chart customization properties that are unsupported by JSChart, see the "About JSChart" topic in this manual. This topic also provides useful information about certain JSChart display issues that you may encounter under specific situations.
To learn more about adding charts to your dashboard see the "Create and edit dashboards via Splunk Web" topic in this manual.
What you'll find in this reference
There are also tables for elements whose properties are either referred to by other elements (for example, a chart element might refer to a particular brush palette element, which in turn refers to a set of brush elements) or inherited by certain elements (for example, all
chart elements inherit properties from the
layoutSprite element, which in turn inherits a base set of properties from the
This reference provides details on the following Splunk charting elements:
- Charts - The
chartelement controls properties specific to individual chart types. For example, when
charthas a value of
line, you can specify properties for a line chart, such as
- Legends - You use the
legendelement to control aspects of the visual appearance of chart legends, including legend placement, label text, and text formatting.
- Axes - The
axiselement controls how data is mapped to the chart grid (but not how it appears--for that see the
axisLabelselement). It is set up to handle three types of chart axes: category axes (which map categorical values), numeric axes (which plot data along a numeric range), and time axes (which plot data along a range of time).
- Axis labels - The
axisLabelselement controls the visualization of chart axes. It places tick marks and labels at locations along chart axes that are appropriate depending upon the state of those axes.
- Axis titles - The
axisTitleelement is mainly used for Cartesian (dual axis) charts such as bar, column, area, and line charts. It enables placement of the x- and y-axis titles within the chart layout.
- Grid lines - The
gridLineselement is used to control the display and appearance of chart grid lines in cartesian (dual axis) chart types, such as bar, column, area, and line charts. Grid lines correspond to axis tick marks from axis labels and extend across the span of the chart.
- Tool tips - Tool tips are the visual elements that appear on chart mouseover, displaying information that corresponds to the chart data sprite underneath the mouse pointer.
- Fonts - Font properties enable you to set a number of characteristics for the fonts used in the charts, such as the font size and style.
- Colors - Color properties enable you to set basic chart color characteristics, such as the color of the chart background.
- Brushes - You can apply a variety of different brushes for the purpose of rendering chart lines and fills in different ways. For example, if you want a line chart to render its lines with a dashed stroke instead of a solid one, you can use a
brushelement of the
- Color palettes - The color palette element is used to control the colors used by brushes, which in turn are used to paint things like chart lines and series swatches in legends. You can define a set list of colors that the palette applies to series, or you can arrange to have the palette generate colors by interpolating between a range of colors (from red to yellow to blue for example).
- Brush palettes - Brush palettes match a series index to a brush type. This can come in handy for things like line charts, where you might want a different type of dashed or solid line for each series represented in the chart.
- Shapes and shape palettes - Shapes are used for markers in several cart types. You can have one shape be used throughout a chart, or you can use a shape palette to assign different shapes to different series.
- Layouts - The
layoutelement controls the layout of all visual chart elements in a dashboard. In most cases you won't need to work with it, but you might use it to set up something like two charts that share the same x- or y-axis.
- Data - The
dataelement enables you to tweak the tabular format that contains the reporting data from which the chart is generated. In most cases you won't need to adjust the
- Text blocks -
textBlockelements control text display in legend and axis labels as well as axis title and message text.
- Layout sprites and sprites - The
spriteelements are formatting elements that feed Flash display properties to many other elements throughout the charting system. In most cases you won't need to adjust these settings.
Panel reference for simple XML
About JSChart, Splunk's primary charting library
This documentation applies to the following versions of Splunk® Enterprise: 5.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9, 5.0.10, 5.0.11, 5.0.12, 5.0.13, 5.0.14, 5.0.15, 5.0.16, 5.0.17, 5.0.18