Dashboards & Visualizations

Dynamically changing chart title using HiddenChartFormatter

vaishnavi07
Explorer

How to provide dynamically changing title to the chart? Am using HiddenChartFormatter module.


right
line
Time

$counter$

connect

300px
100%

The value $counter$ is not dynamically taking the value. its simply displaying as $counter$ directly.
Please let me now if any way is there to solve this. Thanks in advance.

Tags (1)
0 Karma

sideview
SplunkTrust
SplunkTrust

Splunk's HiddenChartFormatter module does not do $foo$ substitution, so you can never use it to implement dynamic charting keys.

The good news is that assuming you have Sideview Utils installed, and your version is newer than 2.6, you can use Sideview's ValueSetter module to completely replace HiddenChartFormatter.
And where HiddenChartFormatter does not do $foo$ substitution (hence your problem), ValueSetter does.

Here is the ValueSetter to replace your HiddenChartFormatter, and it will implement your dynamic chart title. Of course... the solutions also posted using the HTML module to render a simple header are effective too.

<module name="ValueSetter">
  <param name="arg.charting.legend.placement">right</param>
  <param name="arg.charting.chart">line</param>
  <param name="arg.charting.axisTitleX.text">Time</param>                      
  <param name="arg.charting.chartTitle">$counter$</param>                    
  <param name="arg.charting.chart.nullValueMode">connect</param>
0 Karma

sideview
SplunkTrust
SplunkTrust

This error means that you have an old version of Sideview Utils. Or the version you have is older than 2.6 at least. because that's when the arg.* param syntax was added to the ValueSetter module.

Download the latest from http://sideviewapps.com/apps/sideview-utils/

0 Karma

vaishnavi07
Explorer

Should i include side view utils module in my xml code or anything?

0 Karma

vaishnavi07
Explorer

i replaced the hidden chart formatter with the above code and am getting this error.

  • Unknown parameter 'arg.charting.chartTitle' is defined for module ValueSetter. Make sure the parameter is specified in ValueSetter.conf.

similar error i get for arg.charting.legend.placement and arg.charting.chart

0 Karma

harshal_chakran
Builder

Hi,

You can make use of the following HTML module.

  <module name="HTML" layoutPanel="panel_row1_col1"> <param name="html">
      <![CDATA[ <h3>$counter$</h3>]]>
      </param>
 </module>

I hope this helps...!!!

somesoni2
Revered Legend

You would need sideview util for this solution.

0 Karma

harshal_chakran
Builder

Hi,

Put the following module outside HiddenChartFormatter, and keep the put the same Layout in this module.

  <module name="HTML" layoutPanel="panel_row4_col1">-<param name="html">

  <![CDATA[ <h3>KPI Details for $selectedReport$</h3>]]>

</param>

</module>
0 Karma

sideview
SplunkTrust
SplunkTrust

This just means you don't have Sideview Utils app installed - You can download it from here. http://sideviewapps.com/apps/sideview-utils/

0 Karma

vaishnavi07
Explorer

when i used the html module, i got error as unknown module:HTML.

0 Karma

vaishnavi07
Explorer

Does anyone know the answer for above question?

0 Karma
Did you miss .conf21 Virtual?

Good news! The event's keynotes and many of its breakout sessions are now available online, and still totally FREE!