Custom charting configurations
Custom charting configurations
Splunk's charting engine is built on Flash. You can use the Flash interface to communicate with the charting engine and customize your chart. If you've added a chart to your view, you can change how it displays with the following options.
Chart options
This is not an exhaustive list of all chart options, but these are the most commonly changed settings.
Chart type and mode
Change your chart type and display mode.
- chart = area | bar | column | line | pie | scatter
- Use this to change the overall type of chart you wish to generate.
- chart.stackMode = default | stacked | stacked100
- Use this to make bar and area charts display in 'stacked' mode.
- chart.nullValueMode = connect| gaps | zero
- Use this to that control how 'line' and 'area' charts should behave when there are gaps in the data. You can either treat null values as '0', leave an explicit gap, or interpolate between the values.
Legend and titles
Add titles to your chart and axes. Set legend placement.
- legend.placement = right | bottom | left | top | none
- Use this to change where the chart's legend is displayed relative to the chart itself.
- chartTitle = title
- Use this to set the overall HTML title for the Flashchart module.
- primaryAxisTitle.text = title
- Use this to set the X-axis title. Note: in Bar chart this currently this sets the Y-axis title.
- secondaryAxisTitle.text = title
- Use this to set the Y-axis title. Note: in Bar chart this currently this sets the X-axis title.
Scale and range
Set the scale and range for primary and secondary axes.
- primaryAxis.scale = log | empty
- Use this to make the y-axis scale logarithmically or linearly.
- Values can be 'log' or (empty string).
- secondaryAxis.scale = log | empty
- Use this to make the y-axis scale logarithmically or linearly.
- Values can be 'log' or (empty string).
- primaryAxis.minimumNumber | primaryAxis.maximumNumber = integer | empty
- Set to an empty string to revert back to automatic range.
- secondaryAxis.minimumNumber | secondaryAxis.maximumNumber = integer | empty
- Set to an empty string to revert back to automatic range.
- primaryAxis.minimumTime | primaryAxis.maximumTime = integer | empty
- Set to a valid ISO-8601 date-time string.
- For example, 2005-07-01T00:00:00.000-07:00.
- Set to an empty string to revert back to automatic range.
Chart markup
Set colors for you chart. Toggle on and off markers.
- primaryAxisLabels.majorTickVisibility | primaryAxisLabels.minorTickVisibility = show | hide |auto
- Toggle tick marks on axis.
- secondaryAxisLabels.majorTickVisibility | secondaryAxisLabels.minorTickVisibility = show | hide | auto
- Toggle tick marks on axis.
- chart.showMarkers = true | false
- Show/hide Markers for LineChart.
- seriesColors = A comma delimited list of hex color values (no spaces), enclosed in square brackets
- Set the color of your chart areas.
- For examle, [0xCC0000,0xCCCC00,0x00CC00,0x00CCCC,0x0000CC].
Examples
If you're using these settings to change a chart in simple dashboard XML you must add charting. to any setting. For example:
<chart>
<searchString>index=_internal metrics group="pipeline" NOT sendout | head 1000 | timechart per_second(cpu_seconds) by processor</searchString>
<earliestTime>-30h</earliestTime>
<latestTime>-10h</latestTime>
<option name="charting.chart">line</option>
<option name="charting.primaryAxisTitle.text">Time</option>
<option name="charting.secondaryAxisTitle.text">Load (%)</option>
</chart>