# Layered Bar Chart Labels

**URL:** <https://forum.inductiveautomation.com/t/layered-bar-chart-labels/21685>\
**Category:** Ignition\
**Tags:** ignition79, vision\
**Created:** [January 4, 2019, 12:34pm UTC](https://forum.inductiveautomation.com/t/layered-bar-chart-labels/21685 "2019-01-04T12:34:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [January 4, 2019, 12:34pm UTC](https://forum.inductiveautomation.com/t/layered-bar-chart-labels/21685/1 "2019-01-04T12:34:09Z")

</div>

Anyone know of a way or have a work around to only enable labels for one series on the bar chart? I'm also open to other ways to make both numbers show without stacking them on top of each other as the bars get full.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/1d1f51a1ce1642cd5b885ef55aed93eeac984e86.png)

---

<div class="post-metadata">

**Author:** ![Phil\_B](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@Phil\_B](https://forum.inductiveautomation.com/u/Phil_B)\
**Post date:** [July 30, 2019, 5:39pm UTC](https://forum.inductiveautomation.com/t/layered-bar-chart-labels/21685/2 "2019-07-30T17:39:22Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/159fec9b99ef3b215ad1bdacd643b68f7e60d101.png)

I have a similar thing i was working on but we never deployed. the way i did what you are asking is set the label paint color to a 0 opacity “renderer.setSeriesItemLabelPaint(1, Color(0,0,0,0))”

```auto
	from java.awt import Color
	from java.awt import Font
	from org.jfree.chart.labels import StandardCategoryItemLabelGenerator
	from org.jfree.chart.labels import ItemLabelPosition
	from org.jfree.chart.labels import ItemLabelAnchor
	from org.jfree.ui import TextAnchor
	class myLabelGenerator(StandardCategoryItemLabelGenerator):
		def generateLabel(self,dataset,series, category):	
			value = dataset.getValue(series,category)	
			if value == 0:
				return None
			else:
				return str(int(value))
	plot = chart.getPlot()
	renderer = plot.getRenderer()
	renderer.setBaseItemLabelFont(Font("Dialog", Font.BOLD, 16))
	renderer.setItemLabelGenerator(myLabelGenerator())
	renderer.setSeriesItemLabelPaint(1, Color(0,0,0,0))
	renderer.setItemLabelsVisible(True)
	renderer.setBasePositiveItemLabelPosition(ItemLabelPosition(ItemLabelAnchor.OUTSIDE3, TextAnchor.CENTER_LEFT))
	renderer.setSeriesBarWidth(1,0.4)
	chart.legend.setItemFont(Font("SansSerif", Font.BOLD, 20))
	

```

---

<div class="post-metadata">

**Author:** ![Dhruvil\_Patel](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@Dhruvil\_Patel](https://forum.inductiveautomation.com/u/Dhruvil_Patel)\
**Post date:** [November 4, 2022, 6:49pm UTC](https://forum.inductiveautomation.com/t/layered-bar-chart-labels/21685/3 "2022-11-04T18:49:55Z")

</div>

I am referring your code with vertical layered bar chart. I am not able to see the label on any bar.
