<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<script src="https://cdn.flexmonster.com/lib/flexmonster.googlecharts.js"></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>
<div>
<h2>How to create a drillable column chart</h2>
<p>
In this example, we've created a chart that responds to expands on the grid.
This chart works as follows:
</p>
<ul>
<li>
When all members on the grid are collapsed, the chart displays all of
them.
</li>
<li>
When some member is expanded, the chart shows detailed info only about
this member.
</li>
</ul>
<p>
To create such a chart, you should manually preprocess the data for it. It
can be done using the
<a
href="https://www.flexmonster.com/doc/integration-with-google-charts/#prepareDataFunction"
target="_blank"
>prepareDataFunction</a> from Flexmonster Connector for Google Charts.
</p>
<p>
Check out lines 62-114 in the JavaScript box to see how the
<code>prepareDataFunction</code> is defined for the drillable chart.
</p>
<p>
<a
href="https://www.flexmonster.com/doc/integration-with-google-charts/"
target="_blank"
>Visit our docs to learn more about the integration with Google Charts</a>.
</p>
</div>
<div id="pivot-container"></div>
<div id="chartContainer"></div>