# Report Bar Chart Formatting Help

**URL:** <https://forum.inductiveautomation.com/t/report-bar-chart-formatting-help/13967>\
**Category:** Ignition\
**Created:** [March 31, 2017, 7:38pm UTC](https://forum.inductiveautomation.com/t/report-bar-chart-formatting-help/13967 "2017-03-31T19:38:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [March 31, 2017, 7:38pm UTC](https://forum.inductiveautomation.com/t/report-bar-chart-formatting-help/13967/1 "2017-03-31T19:38:47Z")

</div>

Hey folks!

I’m having issues with the axis scaling on the bar chart. It appears that for negative values, the chart scales exactly to the size of the negative. When adding labels to the chart, it results in the most negative value being excluded from the chart. I’d set the axis statically, but the data varies depending on report parameters selected by the user.

I’ve replicated the issue using a static CSV, the most negative number is the set-point for the axis.

Am I doing something wrong here?

Thanks,  
Andrew

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c5108fdf980b40c59cbf727bbc74f146eb40b5a2.JPG)

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [March 31, 2017, 8:28pm UTC](https://forum.inductiveautomation.com/t/report-bar-chart-formatting-help/13967/2 "2017-03-31T20:28:17Z")

</div>

Try adding the following on the scripting portion.

```auto
plot = chart.getPlot()
yAxis = plot.getRangeAxis()
yAxis.setLowerMargin(.1)
```

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [March 31, 2017, 10:31pm UTC](https://forum.inductiveautomation.com/t/report-bar-chart-formatting-help/13967/3 "2017-03-31T22:31:41Z")

</div>

Thanks, that worked well. Much appreciated!

Could this same script be applied to a standard bar graph in a vision window to achieve the same result?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 1, 2017, 12:00am UTC](https://forum.inductiveautomation.com/t/report-bar-chart-formatting-help/13967/4 "2017-04-01T00:00:53Z")

</div>

Yes, they’re both the same underlying JFreeChart objects.
