# Get Easy Chart Axis Properties

**URL:** <https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472>\
**Category:** Ignition\
**Created:** [December 16, 2016, 10:15pm UTC](https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472 "2016-12-16T22:15:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlteel](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jlteel](https://forum.inductiveautomation.com/u/jlteel)\
**Post date:** [December 16, 2016, 10:15pm UTC](https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472/1 "2016-12-16T22:15:58Z")

</div>

I’m aware of the Axis datasets used for Easy Charts, but I’m curious if there’s some way to get an axis’ upper and lower bounds when the axis is set to auto range.

Thank you.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 18, 2016, 12:40am UTC](https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472/2 "2016-12-18T00:40:02Z")

</div>

Not easily, no. But possible, thanks to its use of the [JFreeChart library](http://www.jfree.org/jfreechart/api/javadoc/index.html). The key is that an easychart contains a [ChartPanel](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/ChartPanel.html) as its .chart property, which then contains a [JFreeChart](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/JFreeChart.html), which then contains a [Plot](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/Plot.html). The Plot may or may have subplots, but at the lowest level, in the plot(s) you find Dataset, Range, and ValueAxis types containing the info you’re looking for. Keep in mind that the JFreeChart Dataset type is not the same thing as the Ignition Dataset type.  
Also, if you use classic charts, they are direct subclasses of ChartPanel, skipping the need to access the .chart property.

---

<div class="post-metadata">

**Author:** ![jlteel](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@jlteel](https://forum.inductiveautomation.com/u/jlteel)\
**Post date:** [December 19, 2016, 8:55pm UTC](https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472/3 "2016-12-19T20:55:30Z")

</div>

Thank you, Phil. This, along with another one of your posts explaining your “findJFChart” function were all that I needed. I appreciate the help.

---

<div class="post-metadata">

**Author:** ![jsorlie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jsorlie/32/3645_2.png) [@jsorlie](https://forum.inductiveautomation.com/u/jsorlie)\
**Post date:** [November 10, 2017, 1:40am UTC](https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472/4 "2017-11-10T01:40:17Z")

</div>

2+ Thanks Phil

Your post reveals the JFree object hierarchy: ChartPanel \> Chart \> Plot

I wanted to turn off zoom in charts using setRangeZoomable() method of the chart panel.

In a propertyChange event handler, here is the code that works:

> if event.propertyName == "data":  
> self = event.source  
> chart = self.getChart()  
> plot = chart.getPlot()
> 
> self.setRangeZoomable(False) # [ChartPanel (JFreeChart 1.5.0 API)](http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/ChartPanel.html)

---

<div class="post-metadata">

**Author:** ![dano38291](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@dano38291](https://forum.inductiveautomation.com/u/dano38291)\
**Post date:** [May 9, 2018, 2:51pm UTC](https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472/5 "2018-05-09T14:51:58Z")

</div>

Has anyone accessed Range or ValueAxis properties described here?

I am just trying to read the Y-axis bounds of an Easy Chart so I can make my Report chart object the same values. I could easily write the Start and End Dates to Tags in Property Change scripts. Where are the Y-axis Upper and Lower Bound properties that I can read(after an Auto Range)?

I have some test code in the configureChart Extension function. I am having trouble accessing properties inside the Dataset of a Plot.

```auto
plot = chart.getPlot()
isSub = plot.isSubPlot()
dataset = plot.getDataset()
print dataset
system.gui.messageBox(str(chart)+" "+str(dataset))

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 9, 2018, 3:46pm UTC](https://forum.inductiveautomation.com/t/get-easy-chart-axis-properties/12472/6 "2018-05-09T15:46:20Z")

</div>

try `str(dir(dataset))` in your messageBox().
