# Perspecrive XY CHART Question

**URL:** <https://forum.inductiveautomation.com/t/perspecrive-xy-chart-question/72550>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 18, 2023, 12:35am UTC](https://forum.inductiveautomation.com/t/perspecrive-xy-chart-question/72550 "2023-04-18T00:35:53Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 18, 2023, 1:55am UTC](https://forum.inductiveautomation.com/t/perspecrive-xy-chart-question/72550/6 "2023-04-18T01:55:03Z")

</div>

> [@jiyoung\_hwang1](#):
>
> Even if minDistance is 0.5, it becomes this detailed, but I want to make only 5 grids.

Setting it to 0.5 isn't going to produce 5 gridlines, even if there weren't smarts to work out how many will actually fit on the graph; you would get 100s of 1000s of gridlines (600k)

If you want 5 gridlines dynamically, then you will need to:

1. set the min/max y range statically (`props.yAxes[x].value.range.min/max` and set `useStrict` to `true`)
2. set `props.yAxes[x].appearance.grid.minDistance` = expression binding:

```auto
({this.props.yAxes[x].value.range.max}-{this.props.yAxes[x].value.range.min})/5

```

where x = the array item index of your yAxis.  
right click on this prop and turn on the "persistent" option so that the value is saved with the view (not technically required, but it's better if you do)

However, it looks like there is some logic to make these numbers logical, so depending what this evaluates to, you might see 5 or less gridlines.

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspecrive-xy-chart-question/72550)._
