# Category bar chart - How to remove the gradient?

**URL:** <https://forum.inductiveautomation.com/t/category-bar-chart-how-to-remove-the-gradient/16477>\
**Category:** Ignition\
**Created:** [January 4, 2018, 5:25pm UTC](https://forum.inductiveautomation.com/t/category-bar-chart-how-to-remove-the-gradient/16477 "2018-01-04T17:25:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian.mcenulty](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@brian.mcenulty](https://forum.inductiveautomation.com/u/brian.mcenulty)\
**Post date:** [January 4, 2018, 5:25pm UTC](https://forum.inductiveautomation.com/t/category-bar-chart-how-to-remove-the-gradient/16477/1 "2018-01-04T17:25:45Z")

</div>

I have a chart component that I’ve configured a category chart on. The renderer is set to stacked bar. By default the bars have a gradient on them. I’d like to remove the gradient and just have flat colors. From what I’ve found searching for removing the gradient from a jfreechart categoryplot it looks like I need to set the barPainter to the StandardBarPainter style but I’m not entirely sure how to do that. Has anyone done this before?

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [January 4, 2018, 6:01pm UTC](https://forum.inductiveautomation.com/t/category-bar-chart-how-to-remove-the-gradient/16477/2 "2018-01-04T18:01:06Z")

</div>

Put this in the configureChart extension function.

```auto
	from org.jfree.chart.renderer.category import StandardBarPainter

	plot = chart.getPlot()
	plot.getRenderer().setBarPainter(StandardBarPainter())

```

---

<div class="post-metadata">

**Author:** ![brian.mcenulty](https://avatars.discourse-cdn.com/v4/letter/b/b77776/32.png) [@brian.mcenulty](https://forum.inductiveautomation.com/u/brian.mcenulty)\
**Post date:** [January 4, 2018, 6:07pm UTC](https://forum.inductiveautomation.com/t/category-bar-chart-how-to-remove-the-gradient/16477/3 "2018-01-04T18:07:37Z")

</div>

Thank you! Just in case anyone else needs it, I added one more line to remove the shadow.

```auto
	from org.jfree.chart.renderer.category import StandardBarPainter

	plot = chart.getPlot()
	renderer = plot.getRenderer()
	renderer.setBarPainter(StandardBarPainter())
	renderer.setShadowVisible(0)

```
