Dashboards & Visualizations

How do I increase the height of a Pie Chart (not the panel) on a dashboard in Splunk 6.x?

aferone
Builder

I am trying to use:

<option name="height">450px</option>

However, that increases the size of the panel and not the pie chart itself.

How do I increase the size of the pie chart itself?

Thanks!

0 Karma

chimell
Motivator

Hi aferone
If the xml code above is exactly that you have , i advise you to use exactly the code below , it works

 <dashboard>
    <label>put your label here</label>
<description>Show your description here </description>
    <row>
        <chart>
        <title>Title</title>
        <search ref="Splunk - Search"></search>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">false</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">pie</option>
        <option name="charting.chart.bubbleMaximumSize">50</option>
        <option name="charting.chart.bubbleMinimumSize">10</option>
        <option name="charting.chart.bubbleSizeBy">area</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">right</option>
        <option name="charting.fieldColors">{"Available":0x336633,"Used":0xE60000}</option>
        <option name="height">450px</option>
        <option name="charting.chart.showPercent">true</option>
        </chart>
 </row>
   </dashboard>
0 Karma

aferone
Builder

This is exactly what I have for my code:

    <panel>
      <chart>
        <title>Title</title>
        <search ref="Splunk - Search"></search>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">false</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">pie</option>
        <option name="charting.chart.bubbleMaximumSize">50</option>
        <option name="charting.chart.bubbleMinimumSize">10</option>
        <option name="charting.chart.bubbleSizeBy">area</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">right</option>
        <option name="charting.fieldColors">{"Available":0x336633,"Used":0xE60000}</option>
        <option name="height">450px</option>
        <option name="charting.chart.showPercent">true</option>        
      </chart>
    </panel>

jawaharas
Motivator

'height' option works without 'px' keyword. Thanks.

<option name="height">450</option>
0 Karma

juvetm
Communicator

hi afer
for the moment there no attribute on increase the hieght of the pie chart in splunk but i belief through java script you can do some thing like that

0 Karma

ngatchasandra
Builder

Hi af,
I think that you can do it in Advance XML by using

 <param name="height">X px</param>  X is your size

of FlashChart module. This increase the height of your pie not of panel!

Note that the panel is enlarged according to the size of the pie chart.

You can increase this height like you want (to 450px for example). Try to run example that follow which display a pie chart:

<view template="dashboard.html">
  <label>Size example</label>
  <module name="AccountBar" layoutPanel="appHeader"/>
  <module name="AppBar" layoutPanel="navigationHeader"/>
  <module name="Message" layoutPanel="messaging">
    <param name="filter">*</param>
    <param name="clearOnJobDispatch">False</param>
    <param name="maxSize">1</param>
  </module>
  <module name="TitleBar" layoutPanel="viewHeader">
    <param name="actionsMenuFilter">dashboard</param>
  </module>
  <module name="GenericHeader" layoutPanel="panel_row1_col1"
autoRun="True">
    <param name="label">My  pie chart resolution</param>
      <module name="HiddenSearch" autoRun="True">
        <param name="search">index=_internal|stats count by sourcetype </param>

          <module name="EnablePreview">
            <param name="enable">true</param>
            <param name="display">false</param>
                          <module name="HiddenChartFormatter">
                <param name="chart">pie</param>
                <param name="primaryAxisTitle.text">Time</param>
                <param name="chart.stackMode">default</param>
                <param name="secondaryAxisTitle.text">Count</param>
                  <module name="FlashChart">
                    <param name="width">100%</param>
                    <param name="height">100px</param>
                  </module>
                  <module name="ViewRedirectorLink">
                    <param name="viewTarget">flashtimeline</param>
                    <param name="label">View results</param>
                  </module>
               </module>
            </module>
      </module>
  </module>
</view>
0 Karma

chimell
Motivator

Hi aferone
Use your dashboard xml code without
1-

<panel> </panel>

2- Then use the option , note that you can change the height like you want

 <option name="height">650px</option>

in the

 <chart> </chart>

3- Look at an example :

<dashboard>
  <label>Searches power dashboards</label>
  <description>Show the various searches to power a panel.</description>
  <!-- This row contains three panels -->
  <row>  
      <chart>
        <title>(Inline Search) Top Source Types</title>
        <!-- Inline Search -->
        <search>
          <query>
          index=_internal | top limit=100 sourcetype
          | eval percent = round(percent,2)
          </query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="rowNumbers">true</option>
        <option name="charting.chart">pie</option>
        <option name="height">650</option>
      </chart>     
  </row>

</dashboard>
0 Karma

stephane_cyrill
Builder

Hi, try specifying 100% rather than 450px

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...