# Non linear chart y-axis scale division

**URL:** https://discourse.nodered.org/t/non-linear-chart-y-axis-scale-division/59831
**Category:** Dashboard
**Tags:** chart
**Created:** [14 March 2022 10:10 UTC](https://discourse.nodered.org/t/non-linear-chart-y-axis-scale-division/59831 "2022-03-14T10:10:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sdrshnptl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdrshnptl/32/40446_2.png) [@sdrshnptl](https://discourse.nodered.org/u/sdrshnptl)
#### Post date: [14 March 2022 10:10 UTC](https://discourse.nodered.org/t/non-linear-chart-y-axis-scale-division/59831/1 "2022-03-14T10:10:34Z")

</div>

Hi All!,  
i've to set scale of y-axis between 8 to 18,  
But y-axis scale division are not appropriate.  
As below image,2 point division expected i.e. 8,10,12,14,16,18 but graph showing strange divisions like 8,10,12.5,15,17.5,18  
Any workaround (or hack using ui\_control !) to set y-axis scale division as per required.  
Thanks in advance!  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f5756b9cc2683d24cb53827b1bc26a09664bccbc.png)

node-red 2.2.2  
node-red-dashboard 3.1.6

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [14 March 2022 11:28 UTC](https://discourse.nodered.org/t/non-linear-chart-y-axis-scale-division/59831/2 "2022-03-14T11:28:00Z")

</div>

The algorithm used to determine the divisions does is not as clever as it might be. Though it is a surprisingly difficult in the general case. it works much better with zero based values, for example 0 to 20 works well for your data (though it does waste space obviously. I am sure contributions to improve the algorithm would be welcome.

---

<div class="post-metadata">

### Author: ![sdrshnptl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sdrshnptl/32/40446_2.png) [@sdrshnptl](https://discourse.nodered.org/u/sdrshnptl)
#### Post date: [14 March 2022 11:39 UTC](https://discourse.nodered.org/t/non-linear-chart-y-axis-scale-division/59831/3 "2022-03-14T11:39:50Z")

</div>

Thanks @Colin !  
will take it into consideration.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 March 2022 11:40 UTC](https://discourse.nodered.org/t/non-linear-chart-y-axis-scale-division/59831/4 "2022-03-28T11:40:09Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
