All Apps and Add-ons

Drill down Gantt/bar/timeline Chart and assign specific column's value to token.

agoyal
Builder

Hi,

I want to drill down the Gantt/bar chart and store specific colum's value to some token.

For table we can achieve this by $row.<column name$>. Not sure how to handle it in Gantt Chart. I tried with $click.value$ but its storing the first column data (i.e. _time) and i want to store UniqueIdentifier

$click.UniqueIdentifier$ is not working either.

Dashboard:

  <label>QCST_Tool_DEMO</label>
  <fieldset submitButton="false"></fieldset>
  <row>
    <panel>
      <title>Gantt Chart</title>
      <viz type="timeline_app.timeline">
        <search>
          <query>eventtype=mlc_live host=$host_token$ sourcetype=tool_lifecycle |  rex field="ScriptName" "^\S+_(?&lt;ScriptName&gt;[^\.]+)\.\S+" | rex field="ActivityType" "^#(?&lt;ActivityType&gt;[^\.]+);" | eval ActivityType=if(isNOTNULL(ActivityType),ActivityType,"NA") | search ScriptName IN (*$script_name_token$*) AND ActivityType = "*$activity_type_token$*" AND Status = "*$status_token$*"  | eval ScriptName2=ScriptName | table _time ScriptName ScriptName2 Duration StartDate StartTime EndDate EndTime UniqueIdentifier Status ActivityType | dedup UniqueIdentifier</query>
          <earliest>$time_token.earliest$</earliest>
          <latest>$time_token.latest$</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">all</option>
        <option name="height">399</option>
        <option name="timeline_app.timeline.axisTimeFormat">SECONDS</option>
        <option name="timeline_app.timeline.colorMode">categorical</option>
        <option name="timeline_app.timeline.maxColor">#DA5C5C</option>
        <option name="timeline_app.timeline.minColor">#FFE8E8</option>
        <option name="timeline_app.timeline.numOfBins">3</option>
        <option name="timeline_app.timeline.tooltipTimeFormat">SECONDS</option>
        <option name="timeline_app.timeline.useColors">1</option>
        <drilldown>
          <set token="clicked_value1">$click.value$</set>
         <set token="clicked_value2">$click.UniqueIdentifier$</set>
         <set token="clicked_value3">$row.UniqueIdentifier$</set>
        </drilldown>
      </viz>
            </panel>
  </row>
  <row>
  </row>
</form>
0 Karma
1 Solution

niketnilay
Legend

@agoyal, I have added the post with workaround for Drilldown fix for Second Row of Timeline Custom Visualization, until the issue with drilldown is resolved: https://answers.splunk.com/answers/588491/cant-drill-down-specific-column-in-timeline-chart.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketnilay
Legend

@agoyal, I have added the post with workaround for Drilldown fix for Second Row of Timeline Custom Visualization, until the issue with drilldown is resolved: https://answers.splunk.com/answers/588491/cant-drill-down-specific-column-in-timeline-chart.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketnilay
Legend

@agoyal, I dont think Custom Visualizations like Timeline support <drilldown>, so you might have to create your own JavaScript to handle drilldown scenario.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

agoyal
Builder

okay thanks @niketnilay

0 Karma

niketnilay
Legend

Here is an answer that should get you started: https://answers.splunk.com/answers/471329/is-it-possible-to-drilldown-from-an-status-indicat.html

Let us know if you need assistance.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

agoyal
Builder

@niketnilay: you are great !! i 'll try that out. Cheers!! 🙂

0 Karma
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.