# Report bar chart label configuration

**URL:** <https://forum.inductiveautomation.com/t/report-bar-chart-label-configuration/27983>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [September 3, 2019, 7:28pm UTC](https://forum.inductiveautomation.com/t/report-bar-chart-label-configuration/27983 "2019-09-03T19:28:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![benjamin.samson](https://avatars.discourse-cdn.com/v4/letter/b/7cd45c/32.png) [@benjamin.samson](https://forum.inductiveautomation.com/u/benjamin.samson)\
**Post date:** [October 29, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/report-bar-chart-label-configuration/27983/2 "2019-10-29T15:52:36Z")

</div>

Hi,

You can increase the Y axis upper margin (% of range) property. This will give more space for the bar labels to be displayed correctly.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/313ab18a02c82c98b1afd29be5bb7cff319ef1eb.png)

Regarding the label formatting, you can use the code from this post as a base.  
[Bar Chart (stacked) - How to hide labels if they equal zero](http://forum.inductiveautomation.com/t/bar-chart-stacked-how-to-hide-labels-if-they-equal-zero/12299/2)

Below, I also modified the label font size.

```auto
from org.jfree.chart.labels import StandardCategoryItemLabelGenerator
from java.awt import Font
class myLabelGenerator(StandardCategoryItemLabelGenerator):
	def generateLabel(self,dataset,series, category):
		value = dataset.getValue(series,category)
		if value == 0:
			return None
		else:
			return str(int(value)) + " min"
	
	
plot = chart.getPlot()
renderer = plot.getRenderer()
renderer.setItemLabelGenerator(myLabelGenerator())
renderer.setItemLabelsVisible(True)
renderer.setBaseItemLabelFont(Font("Dialog", Font.PLAIN, 14))
```

Hope this helps,

---

_[View the full topic](https://forum.inductiveautomation.com/t/report-bar-chart-label-configuration/27983)._
