<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<script src="https://cdn.flexmonster.com/lib/flexmonster.amcharts.js"></script>
<script src="https://cdn.amcharts.com/lib/5/index.js"></script>
<script src="https://cdn.amcharts.com/lib/5/percent.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Animated.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Material.js"></script>
<div>
<h2>How to create a nested donut chart</h2>
<p>
This example shows how to create a nested donut chart using
<a
href="https://www.flexmonster.com/api/all-methods-amcharts/"
target="_blank"
>Flexmonster Connector for amCharts</a>.
</p>
<p>
A nested donut chart has several series, which represent different measures.
To create series for each measure in the slice, we use the Connector's
<a
href="https://www.flexmonster.com/api/amcharts-getnumberofmeasures/"
target="_blank"
>getNumberOfMeasures()</a>
and
<a
href="https://www.flexmonster.com/api/amcharts-getmeasurenamebyindex/"
target="_blank"
>getMeasureNameByIndex()</a> methods (lines 77-80 in the JavaScript box).
</p>
<p>
In this example, we've used the <code>Price</code> and
<code>Discount</code> measures for the chart. Try adding other measures to
the slice and see how the chart changes.
</p>
<p>
<a
href="https://www.flexmonster.com/doc/integration-with-amcharts/"
target="_blank"
>Visit our docs to learn more about the integration with amCharts</a>.
</p>
</div>
<div id="pivotContainer">The component will appear here</div>
<div id="amcharts-container"></div>