Dashboards & Visualizations

How to create a graph using columns and lines

PabloCarvalho
New Member

Hello,

I have three information, total (is my target), reached, and percentage of reached.

I'm trying to create a graph using column (with TOTAL) and line (with PERCENTAGE OF REACHED), but I can't.

The search is "internal_data | timechart count as TARGET, count(eval(type="d")) as REACHED | eval %_REACHED=((REACHED*100)/TARGET)"

_time | TARGET | REACHED | %_REACHED
6/10/15 | 3 | 3 | 100
6/11/15 | 8 | 8 | 100
6/12/15 | 24 | 24 | 100

Can someone help with this using a simple or advantage XML?

Thank you.

Tags (3)
0 Karma

chimell
Motivator

Hi PabloCarvalho
To solve your problem ,
Firsly :

Copy and paste the following xml code in a view and save

<dashboard>
  <label>your_view_name</label>
  <row>
    <panel>
      <chart>
        <search>
          <query> index=_internal| timechart count as TARGET, count(eval(type="d")) as REACHED | eval %_REACHED=((REACHED*100)/TARGET)"  </query>
          <earliest>0</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.chart">column</option>
      </chart>
    </panel>    
  </row>
</dashboard>

Secondly :
Configure your chart in the oder to have a Chart overlay
1- Click on edit tab then check edit panels
2-Click on alt text , check chart overlay then fill Overlay field by %_REACHED field. In Scale
field click on Linear tab

3- Save the configuration and click on Done

chimell
Motivator

Hi PabloCarvalho
what about the answer above ? Let see if it satisfy you and tell

0 Karma

yannK
Splunk Employee
Splunk Employee

If you want a columns graph, with a line overlay, check the graph options in the simpleXML UI editor.
as long as the column exists in the result set, you can specify one of the series to be a line.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...