Dashboards & Visualizations

Dashboard timechart x-axis does not show values, only the name of the label

New Member

I don't see the value of the label on the x-axis if I don't zoom the graph (Line Chart).

I have only by example DATETIME and I would like to have ( 00:00, 01:00, 02:00 ....)

If someone can help me, it will be very appreciated.

0 Karma

Communicator

Usually you would use timechart like this and it will give it automatically to you:

<your-search>| timechart span=1h average(your_field) as your_field_average

Let me know, if it was helpful.

0 Karma

New Member

it doesn't work with my request because i am using "stats ...by" .
| stats avg(val1), avg(val2) by val3

if i want val3 on x-axis with the detail, i must do a zoom . Val3 could be a time or another value.

it is a dashboard with line-chart :

0

1

-45
1
line
none
none
0
seriesCompare
top
progressbar

0 Karma

Communicator

Hi,

i just tested:

index="_internal" | timechart avg(executes) as a_executes avg(cumulative_hits) as a_hits

and

index="_internal" | stats avg(executes) as a_executes avg(cumulative_hits) as a_hits by _time

Both draw 2 lines with time as a X-axes. If you use timechart you will always have time on the x-axes.
With stats by you can haven your grouping on the x-axes.

0 Karma

New Member

I don't understand why I have not a good information on x-axis with my request. I put it in a dashboard and it depend on the size on my window .Sometimes I have the information, sometimes not .

    "  <earliest>$t_time.earliest$</earliest>
      <latest>$t_time.latest$</latest>
      <sampleRatio>1</sampleRatio>
    </search>
    <option name="charting.axisLabelsX.majorLabelStyle.rotation">-45</option>
    <option name="charting.axisY.scale">log</option>
    <option name="charting.axisY2.enabled">0</option>
    <option name="charting.chart">line</option>
    <option name="charting.chart.nullValueMode">connect</option>
    <option name="charting.chart.overlayFields">SIGNAL</option>
    <option name="charting.chart.showDataLabels">none</option>
    <option name="charting.drilldown">none</option>
    <option name="charting.layout.splitSeries">0</option>
    <option name="charting.legend.mode">seriesCompare</option>
    <option name="charting.legend.placement">top</option>
    <option name="refresh.display">preview</option>
  </chart>"
0 Karma

Contributor

Hi @is91,

If you could provide the screenshot with search it would be helpful.

0 Karma

Contributor

Could you provide the search query that generates this chart?

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!