# Chart Geometry

**URL:** <https://forum.inductiveautomation.com/t/chart-geometry/2829>\
**Category:** Ignition\
**Created:** [March 31, 2011, 2:23pm UTC](https://forum.inductiveautomation.com/t/chart-geometry/2829 "2011-03-31T14:23:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [March 31, 2011, 2:23pm UTC](https://forum.inductiveautomation.com/t/chart-geometry/2829/1 "2011-03-31T14:23:17Z")

</div>

Was curious if there is a way to determine the location of the margin on your bar chart component (I have to overlay a custom label at the bottom).

Looking at the image below, can I determine where the arrow is pointing?

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

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [April 11, 2011, 4:06pm UTC](https://forum.inductiveautomation.com/t/chart-geometry/2829/2 "2011-04-11T16:06:26Z")

</div>

Yep, you have to dig into the JFreeChart API to find it. Here is some code that would print out that point:

`barChart = event.source.parent.getComponent("Bar Chart")
plotInfo = barChart.chartRenderingInfo.plotInfo
rect = plotInfo.dataArea
print "Plot origin: (%d,%d)" % (int(rect.x), int(rect.y+rect.height))`

Hope this helps,

---

<div class="post-metadata">

**Author:** ![Step7](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Step7](https://forum.inductiveautomation.com/u/Step7)\
**Post date:** [April 11, 2011, 4:54pm UTC](https://forum.inductiveautomation.com/t/chart-geometry/2829/3 "2011-04-11T16:54:35Z")

</div>

Outstanding! That will help a lot. Thanks.
