Skip to main content
Splunk Cloud Platform

Splunk Dashboard Studio

Splunk Cloud Platform™
8.2.2202
This documentation does not apply to the most recent version of Splunk Cloud Platform. For documentation on the most recent version, go to the latest release.

Scatter charts

Use a scatter chart to show relationships between discrete data points. Data point distribution can show trends or relationships across two dimensions.

A scatter chart

Data formatting

Scatter charts work best with two data series. Use a transforming command to aggregate values. You can use the table command with the following syntax to manage result field ordering.

... | table <x-axis_field> <y-axis_field> <category_field>

In Search & Reporting, click the Statistics tab after running the search to make sure that there are at least three columns in the Statistics table. You can use the table command to change the order of the columns if needed.

Generate a scatter chart

  1. Select the scatter chart using the visual editor by clicking the Add Chart button ( The Add Chart button in the editing toolbar. ) in the editing toolbar and either browsing through the available charts, or by using the search option.
  2. Select the chart on your dashboard so that it's highlighted with the blue editing outline.
  3. Set up a new data source by adding a search to the Search with SPL window.
  4. To select an existing data source, close the Configuration panel and reopen it. In the Data Configurations section, click +Setup Primary Data Source and click + Create Ad hoc Search to create a new search from this window. You can also choose a new ID that describes the search better than the default.

Configuration Panel options for scatter charts

You can use the Configuration panel to configure the following scatter chart components.

Title

Give your visualization a name. This is also helpful when searching for individual visualizations in the dashboard definitions. This name is not the same as the automatically assigned unique ID.

Description

Give your visualization a description to explain what the user is viewing.

Data Configurations

Choose an existing ad hoc search or create a new one.

Position & Size
You can use your mouse to change the size or location of the visualization, or the Position & Size section of the Configuration panel for pixel perfect sizing and placement.

Axes

  • Use X Axis title to name your x-axis.
  • Use Y Axis title to name your y-axis.

Legend

  • Use Position to choose the position of the legend.
  • Use Truncation to choose how legend labels are truncated when they overflow the layout boundaries by choosing where to place ellipses (...)

Drilldown
Drilldown for a scatter chart lets users click on a part of the chart to open an internal or external URL.

Code
Select your visualization or its search to view and edit the source code in real-time. You can also change the Visualization ID to a more readable ID to help identify this visualization in the source code.

Configure the scatter graph display options

This generates a square for each unique combination of fields. The value of the field you choose determines the series color.
For example, the following search generates four columns of data in the statistics table:

index=_internal sourcetype=splunkd_access | stats count by status, date_hour | table date_hour count status

The four columns can be used to determine the placement of the squares, the fields of the x and y-axis, and the colors of the squares. For example:

"options": {
	"x": "> primary | seriesByIndex(0)",
	"y": "> primary | seriesByIndex(1)",
	"category": "> primary | seriesByIndex(2)"

primary[n] where the first column, primary[n], is usually time values and n represents the order of the field columns. You can also use field column names, for example:

"options": {
	"x": "> primary | seriesByName(\"date_hour\")",
	"y": "> primary | seriesByName(\"count\")",
	"category": "> primary | seriesByName(status)"

Examples

The following graph uses options and settings that are not available in the visual editor. Expand the dashboard definition to view the options and settings used. The search used to generate the chart is

index=_internal sourcetype=splunkd_access | stats count by status, date_hour | table date_hour count status

A scatter graph

Expand

Scatter chart example

Expand this window to see the dashboard definition of the scatter graph. Expand this window to see the dashboard definition of the scatter graph.

Source options for the scatter chart

While some of these options can be set using the visual editor, there are additional options that can only be set in the source editor for splunk.scatter. These options are added to the options field of the visualization stanza. For example, the following example shows the addition of background color settings using a hexadecimal code:

"viz_25NNIqLF": {
			"type": "splunk.scatter",
			"options": {
				"backgroundColor": "#0000FF",
			},
			"dataSources": {
				"primary": "ds_gcEN4c7Q"
			}
		} 


To read more on how visualization stanzas are structured see: Elements of a visualization. Below are all of the options available.


Expand

Scatter chart options

The following options are available for editing scatter charts in the source editor:


Last modified on 27 January, 2023
Sankey diagrams   Shapes

This documentation applies to the following versions of Splunk Cloud Platform: 9.0.2209, 8.2.2201, 8.2.2202, 8.2.2203, 9.0.2205, 9.0.2208


Please expect delayed responses to documentation feedback while the team migrates content to a new system. We value your input and thank you for your patience as we work to provide you with an improved content experience!

Was this topic useful?







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