# How to format tickvalue which is a number to some precision for any axis

**URL:** <https://community.plotly.com/t/how-to-format-tickvalue-which-is-a-number-to-some-precision-for-any-axis/2975>\
**Category:** plotly.js\
**Created:** [December 28, 2016, 1:29pm UTC](https://community.plotly.com/t/how-to-format-tickvalue-which-is-a-number-to-some-precision-for-any-axis/2975 "2016-12-28T13:29:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stack26](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/stack26/32/812_2.png) [@stack26](https://community.plotly.com/u/stack26)\
**Post date:** [December 28, 2016, 1:29pm UTC](https://community.plotly.com/t/how-to-format-tickvalue-which-is-a-number-to-some-precision-for-any-axis/2975/1 "2016-12-28T13:29:32Z")

</div>

Hello everyone ,

I am having trouble formatting tickvalue which are number for any axis.  
Currently I ma doing something like

```auto
 yaxis : {
							range : [0.000,1.200],
							ticksuffix : "",
							dtick : 0.3000,
							showline : true,
							showgrid: true,
							mirror: 'ticks',
							tickformat : d3.format(".3f"),
							tickmode : 'array'
	}

```

I want number to formattted upto 3 places after decimal.

May I am using tick format in a wrong way.I read the documentation,but there are no examples as such.  
Can any have clue ,how to acheive this ?

Thanks

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [January 4, 2017, 4:52pm UTC](https://community.plotly.com/t/how-to-format-tickvalue-which-is-a-number-to-some-precision-for-any-axis/2975/2 "2017-01-04T16:52:14Z")

</div>

`tickformat :".3f"` should do the trick.

---

<div class="post-metadata">

**Author:** ![stack26](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/stack26/32/812_2.png) [@stack26](https://community.plotly.com/u/stack26)\
**Post date:** [January 9, 2017, 8:32am UTC](https://community.plotly.com/t/how-to-format-tickvalue-which-is-a-number-to-some-precision-for-any-axis/2975/3 "2017-01-09T08:32:06Z")

</div>

Thanks @etienne:Your solution worked.You are doing amazing job.
