# Charts only using 5 colors

**URL:** <https://forum.opensearch.org/t/charts-only-using-5-colors/18658>\
**Category:** Open Source Elasticsearch and Kibana\
**Tags:** troubleshoot, configure\
**Created:** [April 1, 2024, 3:12pm UTC](https://forum.opensearch.org/t/charts-only-using-5-colors/18658 "2024-04-01T15:12:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarolynR](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@CarolynR](https://forum.opensearch.org/u/CarolynR)\
**Post date:** [April 1, 2024, 3:12pm UTC](https://forum.opensearch.org/t/charts-only-using-5-colors/18658/1 "2024-04-01T15:12:47Z")

</div>

When I create a line or pie chart, they only use 5 colors. If there are more than 5 data series (more than 5 pie slices), the 5 colors are reused. Is there to get opensearch to use more than 5 colors by default?

I am running opensearch 2.11.1 in a container on RHEL 9.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/4/4452a7fff41ba718b0aa664115c375c9970539ec.png)

![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/9/99cb0e73654ae6521309f0351896c8fa8aff6542.png)

---

<div class="post-metadata">

**Author:** ![CarolynR](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@CarolynR](https://forum.opensearch.org/u/CarolynR)\
**Post date:** [April 14, 2024, 10:49pm UTC](https://forum.opensearch.org/t/charts-only-using-5-colors/18658/2 "2024-04-14T22:49:20Z")

</div>

Just in case someone else seeing this same problem, it is caused by the change to the way mapped\_color works. If a chart that shows multiple series that include the top values, only that limited number of colors are used, but all the series in the data are initially assigned a color. For instance, if the data includes 45 series but only the top 5 are initially displayed, only 5 colors are used to assign colors to all 45. This assignment is appears to be in just the order the data is processed, where the data that is displayed is top 5 within the data.

Not sure what the color assignment process was changed, but I found a version of the code from September 2023 that works correctly.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [June 13, 2024, 10:49pm UTC](https://forum.opensearch.org/t/charts-only-using-5-colors/18658/3 "2024-06-13T22:49:36Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
