Dashboards & Visualizations

How to make x-axis line up in dashboard.

lakromani
Builder

Lets say I have two different panels in a Dashboard.

One with search like this:

sourcetype=UPS | timechart avg(battery_volt) AS "Volt"

and the other like this:

sourcetype=UPS| timechart avg(battery_temperature) AS "Temperature"

Since they have different legend with different lengt in right side of the panel (Volt/Temperature), they take up different space of the overall window.
This makes the x-axis og the two graphs not align.

Is there a way to set a fixed size of the legend? I do like them to be on the right side.
I could have used on panel if numbers was close to each other, but they are not:

sourcetype=UPS| timechart avg(battery_volt) AS "Volt" avg(battery_temperature) AS "Temperature"
0 Karma

bruceclarke
Contributor

I would combine the two searches, like you said, but then try one of two things:

  1. In the visualization dropdown (the paint brush icon in "Edit Panels"), set "Multi-series mode" to Yes.
  2. In the visualization dropdown, choose the "Chart Overlay" option.

Details on chart overlay here: http://docs.splunk.com/Documentation/Splunk/6.1.8/Viz/Chartcontrols#Chart_overlay

0 Karma

lakromani
Builder
  1. This works, but you will loose granularity or you need to adjust the pixel height to compensate for more graphs.
  2. Using various scales does work, as long as you only need two different one, but I will try to fine tune it som more.
0 Karma

bruceclarke
Contributor

With regards to 1, you can set the chart's height in SimpleXML. That should make it so that the graph is the correct size on the initial page load: <option name="height">750</option>

https://answers.splunk.com/answers/40810/increase-the-size-of-a-chart.html

0 Karma

Richfez
SplunkTrust
SplunkTrust

Change your second search to

sourcetype=UPS| timechart avg(battery_temperature) AS "Temp"

I know it's cheating, but if it works...?

0 Karma

lakromani
Builder

That would work, but I like to set a fixed with, not depending of changing the legend name :9

0 Karma

Richfez
SplunkTrust
SplunkTrust

Well, shucks. 🙂 This answer might be useful enough to SOMEONE that we should leave it here, but be sure to NOT mark it as the answer, please!

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

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 ...