Splunk Cloud Platform

Splunk Dashboard Studio

Part 4: Add a line chart

As a representative of Buttercup Games, you need to present a breakdown of the store's purchase trends. In Splunk Dashboard Studio, you can add a line chart visualization to showcase trends. You will create a line chart that demonstrates purchase trends over time for different game categories.

  1. Select the add chart icon (A bar graph as an icon.) in the editing toolbar, and then select Line.
  2. In the Search section of the Select data source panel, select + Create search.
  3. Name the data source Purchase Trends by Category.
  4. Add your search. For this tutorial, copy and paste the following search into the SPL query field:
    index=main sourcetype=access_* status=200 action=purchase categoryId!=NULL
    | fields _time categoryId clientip
    | timechart count by categoryId 

    This creates a chart where all purchases within each game category are added up and shown as a line chart. The x-axis represents time and all the lines demonstrating trends for each individual game category are overlaid on the same line chart.

  5. Select Apply & Close. At this point, you've created a new data source and assigned it to a line chart.
  6. Select the line chart and title it Purchase Trends by Category.
  7. In the Color and style section of the Configuration panel, change the Background to transparent.
  8. In the Legend section of the Configuration panel, select Top from the Legend display drop-down menu.
  9. In the X-axis grid and labels section of the Configuration panel, turn off Axis title.
  10. In the Y-axis grid and labels section of the Configuration panel, title the Y-axis Purchases.
  11. Move and resize your line chart to center it on the top right rectangle.

After completing Part 4, your line chart looks similar to the following:

A line chart showing the amount of purchases per game category.

Next step

You've completed Part 4 of the Splunk Dashboard Studio tutorial and your dashboard has a line chart. Next, you'll show total revenue from Buttercup Games by adding a single value visualization. Continue to Part 5: Add a single value visualization.

Last modified on 25 January, 2024
Part 3: Add a table with column formatting   Part 5: Add a single value visualization

This documentation applies to the following versions of Splunk Cloud Platform: 9.0.2303, 9.0.2305, 9.1.2308 (latest FedRAMP release), 9.1.2312, 9.2.2403

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