Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Showing just the legend of a Pie Chart

LSDevJun 17 2015 — edited Jun 17 2015

I'm currently trying to display a dashboard of fixed size pie charts in APEX 4.26 however, they need to have a legend and their content is dynamic.  This means that a chart with more labels has a larger legend and a smaller pie chart than say one with only two labels.

My current possible solution is to create two regions for each chart, one with the pie in it and one with just the legend, then I can control the size of these regions easily.

Obviously, I can easily turn off the Legend for the first region but I'm having a bit of trouble displaying only the legend in the other.  Can anyone help me with what I need to alter or remove from the XML? (I'm presuming this is the way to do it).  Here is my XML at the minute:

<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>

<anychart>

  <settings>

    <animation enabled="true"/>

    <no_data show_waiting_animation="False">

      <label>

        <text>#NO_DATA_MESSAGE#</text>

        <font family="Verdana" bold="yes" size="10"/>

      </label>

    </no_data>

  </settings>

  <margin left="0" top="-10" right="0" bottom="0" />

  <charts>

    <chart plot_type="Pie" name="chart_3232705401305025">

      <chart_settings>

        <title enabled="False" />

        <chart_background>

          <fill type="Solid" color="0xffffff" opacity="0" />

          <border enabled="false"/>

          <corners type="Square"/>

        </chart_background>

        <data_plot_background>

        </data_plot_background>

        <legend enabled="true" position="Bottom" align="Near" elements_layout="Horizontal" ignore_auto_item="True">

          <title enabled="False"/>

          <icon>

            <marker enabled="true" />

          </icon>

          <items>

            <item source="Points" />

          </items>

          <font family="Tahoma" size="10" color="0x000000" />

        </legend>

        <chart_animation type="Appear" interpolation_type="Quadratic" show_mode="OneByOne"/>

      </chart_settings>

      <data_plot_settings enable_3d_mode="false" >

        <pie_series style="Aqua">

          <tooltip_settings enabled="true">

            <format><![CDATA[{%Name}{enabled:False} - {%Value}{numDecimals:0,decimalSeparator:.,thousandsSeparator:\,}]]></format>

            <font family="Tahoma" size="10" color="0x000000" />

              <position anchor="Float" valign="Top" padding="10" />

          </tooltip_settings>

          <label_settings enabled="false"/>

          <pie_style>

          </pie_style>

          <marker_settings enabled="True" >

            <marker type="None" />

          </marker_settings>

          <connector color="Black" opacity="0.4"/>

        </pie_series>

      </data_plot_settings>

#DATA#

    </chart>

  </charts>

</anychart>

Any pointers much appreciated! Or any bright ideas on an easier way to achieve this.

Thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2015
Added on Jun 17 2015
0 comments
532 views