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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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