All Apps and Add-ons

populating secondaryAxisTitle.text parameter in hiddenchart formatter from url (Sideview)

stephenho
Path Finder

Hi All,

I'm passing a parameter through the URL and using URLLoader to pick up the data.
eg www.mywebsite.com/dashboard1?Units=Gbps

Using URLLoader, I can grab the Units value and use it the HTML components of my page. However, when I try to use that same metric in the "secondaryAxisTitle.text " parameter in the Sideview HiddenChartFormatter, I get the literal text. eg $Units$

Is this a limitation of the module, or am I just using it wrong?

Cheers,

Steve

1 Solution

sideview
SplunkTrust
SplunkTrust

HiddenChartFormatter is actually a Splunk module, not a Sideview module. While almost every param in every Sideview module does $foo$ substitution, the Splunk modules in general do not.

You have a couple easy options though.

1) You can put the argument into the URL with the right name from the start: viewName?charting.secondaryAxisTitle.text=Gbps

URLLoader will turn this into a $foo$ token by that same name, and this will be picked up by any the chart modules downstream from the URLLoader.

2) Or, you can use a Sideview ValueSetter module to basically copy the value over to the right name. Put this upstream from the chart module, and of course downstream from URLLoader, and it'll work.

<module name="ValueSetter">
  <param name="name">charting.secondaryAxisTitle.text</param>
  <param name="value">$Units$</param>

If you're using an older version of Sideview Utils make sure to update to the latest (2.5). There have been a ton of fixes, new features, as well as ongoing improvements to the documentation. http://sideviewapps.com/apps/sideview-utils

View solution in original post

sideview
SplunkTrust
SplunkTrust

HiddenChartFormatter is actually a Splunk module, not a Sideview module. While almost every param in every Sideview module does $foo$ substitution, the Splunk modules in general do not.

You have a couple easy options though.

1) You can put the argument into the URL with the right name from the start: viewName?charting.secondaryAxisTitle.text=Gbps

URLLoader will turn this into a $foo$ token by that same name, and this will be picked up by any the chart modules downstream from the URLLoader.

2) Or, you can use a Sideview ValueSetter module to basically copy the value over to the right name. Put this upstream from the chart module, and of course downstream from URLLoader, and it'll work.

<module name="ValueSetter">
  <param name="name">charting.secondaryAxisTitle.text</param>
  <param name="value">$Units$</param>

If you're using an older version of Sideview Utils make sure to update to the latest (2.5). There have been a ton of fixes, new features, as well as ongoing improvements to the documentation. http://sideviewapps.com/apps/sideview-utils

stephenho
Path Finder

Thanks Nick!! I used the valuesetter module and it worked like a charm!!

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...