<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div>
<h2>Show only the lowest expanded field on the chart</h2>
<p>
Using the buttons below, you can turn on/off the
<a
href="https://www.flexmonster.com/api/chart-options-object/#onelevel"
target="_blank"
>chart.oneLevel</a> option. See the difference in behavior by expanding
and collapsing fields with the <code>+</code>/<code>-</code> icons
on the chart's legend.
</p>
</div>
<button onclick="showOneLevel(true)">Show the lowest expanded field</button>
<button onclick="showOneLevel(false)">Show all fields</button>
<div id="pivot-container"></div>