Dear Support
I am looking to hide in chart legend one field that shows in legend, field that is used only for drill-down purpose. Please see the following chart code:
<chart>
<search>
<query>`mc_vln`
| search DB_NAME=$field_db_name$
| stats
count(eval(CTRL_FIND_ID=-1)) as Broken,
count(eval(CTRL_FIND_ID=0)) as Correct,
count(eval(CTRL_FIND_ID=1)) as Finding,
earliest(_time) as SCAN_DT_START
by DB_NAME SCAN_ID
| sort - SCAN_DT_START
| table DB_NAME SCAN_ID SCAN_DT_START Broken Correct Finding
| dedup $field_last_x_scan$ DB_NAME
| head 15
| sort SCAN_DT_START
| fields - SCAN_DT_START</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>
<option name="charting.axisLabelsX.majorLabelStyle.rotation">-45</option>
<option name="charting.axisTitleX.visibility">collapsed</option>
<option name="charting.chart">column</option>
<option name="charting.chart.stackMode">default</option>
<option name="charting.legend.labels">["Finding","Correct","Broken"]</option>
<option name="charting.legend.placement">top</option>
<option name="charting.seriesColors">[0xFA4343,0x00579F,0x646464]</option>
<option name="charting.legend.masterLegend"></option>
<drilldown target="blank">
<link>scan_data?form.field_db_name=$click.value$&form.field_scan_id=$row.SCAN_ID$&form.field_ctrl_find_name=$click.name2$</link>
</drilldown>
</chart>
I have got the SCAN_ID field in the "| table" part of my search only for using it in the drill-down.
The problem is that this field SCAN_ID shows as an extra item in the Legend, while it logically produces no column. All the rest of the chart is OK - Database in X and Correct/Finding/Broken columns (per each Scan SCAN_DT_START) are shown.
Question: How can I hide this unnecessary SCAN_ID legend item from the chart ? But without loosing it for drill-down - if I: | fields - SCAN_DT_START SCAN_ID then I get $row.SCAN_ID$ on the other side.
looking for something as done for Table Dashboards in: 26825/drilldown-from-a-hidden-column.html with
Splunk 6.0-6.4.x
<option name="fields">field1,field2,field4,count</option>
Splunk 6.5+
<fields>field1,field2,field4,count</fields>
but for chart-equivalent (and thus hopefully in sImple XML)
at your disposal for further info
best regards, Altin
... View more