# Change X-axis Label in chart

**URL:** <https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803>\
**Category:** Dashboard\
**Tags:** node-red-dashboard, function-node\
**Created:** [18 November 2022 00:54 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803 "2022-11-18T00:54:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![itzjujo092](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/itzjujo092/32/76970_2.png) [@itzjujo092](https://discourse.nodered.org/u/itzjujo092)\
**Post date:** [18 November 2022 00:54 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/1 "2022-11-18T00:54:14Z")

</div>

Hello guys!

I want to change the X-axis label in the chart for a custom value.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c30e43fbb40eb4e5c5127a2fa2e76b1266a5386a.png)

in this image, we can see that i already have the hour to replace X-axis.

My question here is.

How can i replace the X-axis for a hour that i have?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/3/034541bc8ede61353e3ff959c674598df844a2a3.png)

---

<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:** [18 November 2022 06:17 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/2 "2022-11-18T06:17:13Z")

</div>

Set X-axis label to "Automatic"  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/c/2ce6231602b720f202f9058a5008b533caa7e4ed.png)

And feed data form as mention [here](https://github.com/node-red/node-red-dashboard/blob/master/Charts.md#line-charts-1)  
Best of luck!

-SP

---

<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:** [18 November 2022 07:10 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/3 "2022-11-18T07:10:46Z")

</div>

I am not sure exactly what you mean. Are you giving the chart a full set of data in one go or are you giving it data one sample at a time in real time?

---

<div class="post-metadata">

**Author:** ![itzjujo092](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/itzjujo092/32/76970_2.png) [@itzjujo092](https://discourse.nodered.org/u/itzjujo092)\
**Post date:** [18 November 2022 20:08 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/4 "2022-11-18T20:08:27Z")

</div>

ohhh ok, but i want that X-Axis has a customizable hour, How can i do that?

---

<div class="post-metadata">

**Author:** ![itzjujo092](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/itzjujo092/32/76970_2.png) [@itzjujo092](https://discourse.nodered.org/u/itzjujo092)\
**Post date:** [18 November 2022 20:11 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/5 "2022-11-18T20:11:57Z")

</div>

i try to mean this:

I have a weather station, that weather station send data to node red. But in this data, the station have a value called "Hour" that is whats shown in my first image, so, i want to set that value in the X-Axis.

Understood?

---

<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:** [18 November 2022 22:30 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/6 "2022-11-18T22:30:20Z")

</div>

Please get it working correctly first, then we can look at whether it needs adjusting.

---

<div class="post-metadata">

**Author:** ![itzjujo092](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/itzjujo092/32/76970_2.png) [@itzjujo092](https://discourse.nodered.org/u/itzjujo092)\
**Post date:** [18 November 2022 22:45 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/7 "2022-11-18T22:45:13Z")

</div>

Is already work!

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fdab8440018e32213995d36c53c9ad4ba1677867.png)

That was working long time ago, now i can look that

---

<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:** [19 November 2022 07:08 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/8 "2022-11-19T07:08:38Z")

</div>

Ok, now explain in detail exactly what you want to see there, draw a sketch or manipulate that image so we understand.

---

<div class="post-metadata">

**Author:** ![itzjujo092](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/itzjujo092/32/76970_2.png) [@itzjujo092](https://discourse.nodered.org/u/itzjujo092)\
**Post date:** [20 November 2022 03:55 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/9 "2022-11-20T03:55:52Z")

</div>

Ok, Look at this:  
1- My weather station is reporting the data via JSON, how i can show in the next image:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/85abbd53f85536cca8baa9f9d305300c2c84c822.png)

2- How we can see, the value called "Timestamp" show the hour when data was extracted, for example, The temperature.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/f/df936131146d63deeb72b899f3df878829082636.jpeg)

3- Ok, considering this data, what i want is that in the X-Axis of the chart:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/26dd3e1630001d38830a857ec429307fa075e033.png)

I want to see the value "Timestamp" in the X-Axis

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4f9abb0627a165ef3cb023c893ddd9efad03459b.png)

---

<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:** [20 November 2022 07:33 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/10 "2022-11-20T07:33:27Z")

</div>

Do you mean in the first image you previously posted, instead of seeing `4:00:00 pm ` you want to see `Nov 19. 4pm`? If so then that is not determined by node red, it is up to the settings in the browser and the system locale settings how it displays timestamps.

---

<div class="post-metadata">

**Author:** ![itzjujo092](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/itzjujo092/32/76970_2.png) [@itzjujo092](https://discourse.nodered.org/u/itzjujo092)\
**Post date:** [21 November 2022 01:51 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/11 "2022-11-21T01:51:32Z")

</div>

Nooooo, im searching this

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c30e43fbb40eb4e5c5127a2fa2e76b1266a5386a.png)

And this value, Drawing this way (The next image that im going to up is how i want to see the chart)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/0/40392e8a78b595835c8b0dff4f02d60b00576660.png)

How you can see, the X-axis is according to the timestamp value, i want something like this.

---

<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:** [21 December 2022 01:51 UTC](https://discourse.nodered.org/t/change-x-axis-label-in-chart/70803/12 "2022-12-21T01:51:51Z")

</div>

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