# Set upper and lower bound through scripting in vision chart

**URL:** <https://forum.inductiveautomation.com/t/set-upper-and-lower-bound-through-scripting-in-vision-chart/75195>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [June 19, 2023, 7:38am UTC](https://forum.inductiveautomation.com/t/set-upper-and-lower-bound-through-scripting-in-vision-chart/75195 "2023-06-19T07:38:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aman\_sharma](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@aman\_sharma](https://forum.inductiveautomation.com/u/aman_sharma)\
**Post date:** [June 19, 2023, 7:38am UTC](https://forum.inductiveautomation.com/t/set-upper-and-lower-bound-through-scripting-in-vision-chart/75195/1 "2023-06-19T07:38:28Z")

</div>

hi,  
i want to set the upper and lower bound through scripting in vision chart.  
i tried this code:  
chart = self.Data|  
axes = chart.getYAxes()  
axis.setLowerBound(20)  
axis.setUpperBound(100)  
chart.setYAxes(axes)  
chart.createChart()

but its not working

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 19, 2023, 12:13pm UTC](https://forum.inductiveautomation.com/t/set-upper-and-lower-bound-through-scripting-in-vision-chart/75195/2 "2023-06-19T12:13:27Z")

</div>

I haven't dug too deeply, but based on what you pasted, you do not have 'axis' defined; 'axes', yes, but not 'axis'

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 19, 2023, 5:17pm UTC](https://forum.inductiveautomation.com/t/set-upper-and-lower-bound-through-scripting-in-vision-chart/75195/3 "2023-06-19T17:17:44Z")

</div>

It would be something like this in the `configureChart` extension function.

```auto
axis = chart.plot.rangeAxis
axis.lowerBound = 20
axis.upperBound = 100

```

---

<div class="post-metadata">

**Author:** ![aman\_sharma](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@aman\_sharma](https://forum.inductiveautomation.com/u/aman_sharma)\
**Post date:** [June 20, 2023, 6:52am UTC](https://forum.inductiveautomation.com/t/set-upper-and-lower-bound-through-scripting-in-vision-chart/75195/4 "2023-06-20T06:52:02Z")

</div>

thanks its working
