All Apps and Add-ons

Charting types in JS chart

ncbshiva
Communicator

This is my code,i want the pie chart to be displayed first and then the table to be displayed below.
I am getting first table and then the pie chart.

<module name="SimpleResultsHeader">
  <param name="entityName">results</param>
  <param name="headerFormat">Corresponding Revenue Loss(in CEDI)</param>
</module> <!-- SimpleResultsHeader -->

<module name="HiddenChartFormatter">
  <param name="charting.chart">pie</param>
  <param name="charting.legend.placement">none</param>
  <module name="SimpleResultsTable">
    <param name="entityName">results</param>
  </module>

  <module name="JobProgressIndicator"/>

  <!-- The JSChart containing drilldowns -->
  <module name="JSChart">
    <param name="width">100%</param>
    <param name="height">300px</param>
  </module>
</module>
1 Solution

sideview
SplunkTrust
SplunkTrust

Your view will have layoutPanel attributes on some of the modules. When a module doesn't have one of these, it will inherit whatever value is set upstream on a higher level module in the xml hierarchy. So all of these modules are going into the same layoutPanel, and when that happens they simply come out in the same order they're in in the XML file. Therefore you just reorder the modules in the XML.

I have omitted the SimpleResultsHeader cause it wasn't a part of the problem, but you'll see that you now have JobProgressIndicator, then the chart, then the table. And HiddenChartFormatter is of course hidden.

<module name="JobProgressIndicator"/>
<module name="HiddenChartFormatter">
  <param name="charting.chart">pie</param>
  <param name="charting.legend.placement">none</param>
  <module name="JSChart">
    <param name="width">100%</param>
    <param name="height">300px</param>
  </module>
  <module name="SimpleResultsTable">
    <param name="entityName">results</param>
  </module>
</module>

If you want a good primer for how the Advanced XML works, download a recent copy of Sideview Utils ( http://sideviewapps.com/apps/sideview-utils ) and carefully read the page at "Key Techniques > Overview of the Advanced XML"

View solution in original post

sideview
SplunkTrust
SplunkTrust

Your view will have layoutPanel attributes on some of the modules. When a module doesn't have one of these, it will inherit whatever value is set upstream on a higher level module in the xml hierarchy. So all of these modules are going into the same layoutPanel, and when that happens they simply come out in the same order they're in in the XML file. Therefore you just reorder the modules in the XML.

I have omitted the SimpleResultsHeader cause it wasn't a part of the problem, but you'll see that you now have JobProgressIndicator, then the chart, then the table. And HiddenChartFormatter is of course hidden.

<module name="JobProgressIndicator"/>
<module name="HiddenChartFormatter">
  <param name="charting.chart">pie</param>
  <param name="charting.legend.placement">none</param>
  <module name="JSChart">
    <param name="width">100%</param>
    <param name="height">300px</param>
  </module>
  <module name="SimpleResultsTable">
    <param name="entityName">results</param>
  </module>
</module>

If you want a good primer for how the Advanced XML works, download a recent copy of Sideview Utils ( http://sideviewapps.com/apps/sideview-utils ) and carefully read the page at "Key Techniques > Overview of the Advanced XML"

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...