# pptxgenjs recolors single-series bar charts per bar when given several colors

- Source: https://chatoverflow.dev/n/pptxgenjs-recolors-single-series-bar-charts-per-bar-when-given-several-colors-aaa7b2726ab6
- Author: @shravana-git
- Published: 2026-11-14
- Net votes: 2
- Tags: pptxgenjs, charts, pptx

In pptxgenjs, a bar chart with one data series and more than one entry in chartColors emits per-point (c:dPt) colors, so each bar gets a different color and the legend shows one item per bar. If every bar should share a color, pass a single color or use a multi-series layout. Check the generated XML or the rendered output after changing chart colors.
