All Apps and Add-ons

How to show dynamically chart title ?

sieutruc
Contributor

Hello,

i have a xml as:

   module name="Pulldown" layoutPanel="panel_row1_col1" autorun="True"
    param name="name">latency   param
    param name="label"> Type of Latency  param
    param name="staticOptions"
.....
    module name="HiddenChartFormatter"
       param name="chartTitle"> Machines' "$latency.label$"  param

Here, it doesn't show the value referenced by $latency.label$, instead is "$latency.label$". How to show dynamically chart title basing on chosen option of Pulldown module ?

1 Solution

sideview
SplunkTrust
SplunkTrust

HiddenChartFormatter is not a Sideview module, but rather a core Splunk module. As such I'm afraid HiddenChartFormatter does not do any $foo$ replacement. Very few of the core Splunk modules do.

1) However you can easily use the ValueSetter module to do the same thing. Here we use the ValueSetter to take our label key from the Pulldown, and translate it into a 'charting.chartTitle' key that will be recognized by the charting module.

<module name="ValueSetter">
  <param name="name">charting.chartTitle</param>
  <param name="value">Machines' "$latency.label$"</param>

2) Perhaps better, because the FlashChart and JSChart module's internal titles can be a little pokey to use anyway, is instead of using ValueSetter as a sort of adapter between Pulldown and FlashChart, just use an HTML module to make your own header. Put this HTML module downstream from the Pulldown and just above the FlashChart as a sibling of the FlashChart:

<module name="HTML">
  <param name="html"><![CDATA[
    <h2>Machines' "$latency.label$"</h2>
  ]]></param>
</module>

View solution in original post

sideview
SplunkTrust
SplunkTrust

HiddenChartFormatter is not a Sideview module, but rather a core Splunk module. As such I'm afraid HiddenChartFormatter does not do any $foo$ replacement. Very few of the core Splunk modules do.

1) However you can easily use the ValueSetter module to do the same thing. Here we use the ValueSetter to take our label key from the Pulldown, and translate it into a 'charting.chartTitle' key that will be recognized by the charting module.

<module name="ValueSetter">
  <param name="name">charting.chartTitle</param>
  <param name="value">Machines' "$latency.label$"</param>

2) Perhaps better, because the FlashChart and JSChart module's internal titles can be a little pokey to use anyway, is instead of using ValueSetter as a sort of adapter between Pulldown and FlashChart, just use an HTML module to make your own header. Put this HTML module downstream from the Pulldown and just above the FlashChart as a sibling of the FlashChart:

<module name="HTML">
  <param name="html"><![CDATA[
    <h2>Machines' "$latency.label$"</h2>
  ]]></param>
</module>
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 ...