<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinycolor/1.4.1/tinycolor.min.js"></script>
<div>
<h2>How to change color for a certain member on charts</h2>
<p>
This example demonstrates how you can customize a chart sector based on its
data.
</p>
<p>
To customize the pivot charts, use the
<a
href="https://www.flexmonster.com/api/customizechartelement/"
target="_blank"
>customizeChartElement()</a
>
method. In this example, we check whether chart's data contains the
<code>United States</code> member. If it does, we change the chart sector's
color.
</p>
<p>
<a
href="https://www.flexmonster.com/doc/customizing-pivot-charts/"
target="_blank"
>Visit our docs to learn more about customizing the charts</a>.
</p>
</div>
<div id="pivot-container"></div>