# Set custom python chart precision / number scale

**URL:** <https://community.netdata.cloud/t/set-custom-python-chart-precision-number-scale/2707>\
**Category:** Help\
**Tags:** agent\
**Created:** [March 28, 2022, 7:25am UTC](https://community.netdata.cloud/t/set-custom-python-chart-precision-number-scale/2707 "2022-03-28T07:25:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inigo\_Arribillaga](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/inigo_arribillaga/32/1650_2.png) [@Inigo\_Arribillaga](https://community.netdata.cloud/u/Inigo_Arribillaga)\
**Post date:** [March 28, 2022, 7:25am UTC](https://community.netdata.cloud/t/set-custom-python-chart-precision-number-scale/2707/1 "2022-03-28T07:25:54Z")

</div>

**Problem/Question**

I have implemented a custom python collector. It collects data from one of my apps and I have managed to successfully (almost) print it in my own custom chart. However, the samples I want to show are often values between 0 and 1 seconds. I haven’t figured out how to change the chart precision so that it won’t always show value=0 in my dashboard.

One solution is to multiply the value x1000 and show the data in milliseconds, but I would rather have it in seconds.

How can I solve this?

---

<div class="post-metadata">

**Author:** ![wlisikpl](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@wlisikpl](https://community.netdata.cloud/u/wlisikpl)\
**Post date:** [March 28, 2022, 8:40am UTC](https://community.netdata.cloud/t/set-custom-python-chart-precision-number-scale/2707/2 "2022-03-28T08:40:47Z")

</div>

> [@Inigo\_Arribillaga](#):
>
> I haven’t figured out how to change the chart precision so that it won’t always show value=0 in my dashboard.

Currently there is no direct ( in-UI ) way oof changing chart-precision. But, if you are somewhat fluent with `JS`, you can just use sth like:

```javascript
// Lets take ram.avail meter as an example and re-scale it
let rescale = DOMMatrix.fromMatrix('ram.avail').scale(100,100,100,0,0,0);

```

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [March 30, 2022, 6:49am UTC](https://community.netdata.cloud/t/set-custom-python-chart-precision-number-scale/2707/3 "2022-03-30T06:49:02Z")

</div>

Hi, @Inigo_Arribillaga. The collected values type is an integer. If you want to push fractional values, multiply this value by 100 (or 1000) and set the dimension divider to 100 (or 1000).

---

<div class="post-metadata">

**Author:** ![wlisikpl](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@wlisikpl](https://community.netdata.cloud/u/wlisikpl)\
**Post date:** [March 30, 2022, 6:59am UTC](https://community.netdata.cloud/t/set-custom-python-chart-precision-number-scale/2707/4 "2022-03-30T06:59:21Z")

</div>

@ilyam8 thats not what OP asked for…

---

<div class="post-metadata">

**Author:** ![Inigo\_Arribillaga](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/inigo_arribillaga/32/1650_2.png) [@Inigo\_Arribillaga](https://community.netdata.cloud/u/Inigo_Arribillaga)\
**Post date:** [March 30, 2022, 8:27am UTC](https://community.netdata.cloud/t/set-custom-python-chart-precision-number-scale/2707/5 "2022-03-30T08:27:29Z")

</div>

This works perfecly, thanks!
