Dashboards & Visualizations

How do I plot a trendline on a pivot chart

jeremiahc4
Builder

I am using Pivot to create a dashboard full of pretty charts. Some of these charts lend themselves to having a trendline drawn on them. However, I can't seem to plot a trendline in Pivot. Am I missing something obvious or is this an advanced scenario where I need to bust out the command reference and do it via normal search means?

0 Karma
1 Solution

mattness
Splunk Employee
Splunk Employee

Trendlines aren't available for the initial release of Pivot. You can use Pivot in conjunction with the old-school method of adding trendlines to charts by getting the pivot search string...

  • create your pretty chart in Pivot
  • add it to a dashboard
  • click Edit > Edit Panel and then click the pivot symbol and select Edit Search String. This reveals a simplified version of the pivot search that uses the pivot command. Eventually you may become familiar enough with the pivot command to code searches using it.

...and then using that search string in a larger search that uses the trendline command to plot a trendline. Or you could set up a dashboard panel that utilizes some tricksy implementation of chart overlay (pivot chart over trendline chart)...whatever works best for you.

View solution in original post

mattness
Splunk Employee
Splunk Employee

Trendlines aren't available for the initial release of Pivot. You can use Pivot in conjunction with the old-school method of adding trendlines to charts by getting the pivot search string...

  • create your pretty chart in Pivot
  • add it to a dashboard
  • click Edit > Edit Panel and then click the pivot symbol and select Edit Search String. This reveals a simplified version of the pivot search that uses the pivot command. Eventually you may become familiar enough with the pivot command to code searches using it.

...and then using that search string in a larger search that uses the trendline command to plot a trendline. Or you could set up a dashboard panel that utilizes some tricksy implementation of chart overlay (pivot chart over trendline chart)...whatever works best for you.

mattness
Splunk Employee
Splunk Employee

That's an awesome solution to the problem. datamodel command FTW!

0 Karma

jeremiahc4
Builder

That makes sense then. I was able to use the datamodel command in order to take advantage of the information I already had organized there. a very simple example below;

| datamodel TicketData Ticket_Index search | search | timechart count | trendline sma2(count) as Trend

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...