# Create a diagram that can change the X-axis label

**URL:** https://discourse.nodered.org/t/create-a-diagram-that-can-change-the-x-axis-label/88958
**Category:** Dashboard
**Tags:** chart
**Created:** [26 June 2024 05:22 UTC](https://discourse.nodered.org/t/create-a-diagram-that-can-change-the-x-axis-label/88958 "2024-06-26T05:22:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Javierv](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@Javierv](https://discourse.nodered.org/u/Javierv)
#### Post date: [26 June 2024 05:22 UTC](https://discourse.nodered.org/t/create-a-diagram-that-can-change-the-x-axis-label/88958/1 "2024-06-26T05:22:23Z")

</div>

Good morning to all!!  
I am developing a software to datalogging, and in the report, I want to create a chart that read the file with data registers, a txt file and shows a chart with that data. The problem is X-axis label, I want to show the time saves in the that file, no the real time. With the chart included in the dashboard, I haven´t other option to show in the X-axis label that labels with the real time. Do you know if it is possible with other chart´s node?  
Thanks for your time.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [26 June 2024 09:02 UTC](https://discourse.nodered.org/t/create-a-diagram-that-can-change-the-x-axis-label/88958/2 "2024-06-26T09:02:15Z")

</div>

I am assuming older dashboard...

it should show whatever you are sending as label to x - axis. can you post an example

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

```auto
[{"id":"c357ee51a3ab8bf2","type":"ui_chart","z":"4cde86148e5b95f7","name":"","group":"fdedcd61c681d69a","order":8,"width":"9","height":"6","label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":425,"y":775,"wires":[[]]},{"id":"de84057cee7091c7","type":"inject","z":"4cde86148e5b95f7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{ \"series\": [\"A\", \"B\", \"C\"], \"data\": [[{ \"x\": 1504029632890, \"y\": 5 }, { \"x\": 1504029636001, \"y\": 4 }, { \"x\": 1504029638656, \"y\": 2 }], [{ \"x\": 1504029633514, \"y\": 6 }, { \"x\": 1504029636622, \"y\": 7 }, { \"x\": 1504029639539, \"y\": 6 }], [{ \"x\": 1504029634400, \"y\": 7 }, { \"x\": 1504029637959, \"y\": 7 }, { \"x\": 1504029640317, \"y\": 7 }] ], \"labels\": [\"\"] }]","payloadType":"json","x":275,"y":775,"wires":[["c357ee51a3ab8bf2"]]},{"id":"fdedcd61c681d69a","type":"ui_group","name":"LIVE","tab":"fbe9cc4da47a8d17","order":1,"disp":false,"width":"44","collapse":false,"className":""},{"id":"fbe9cc4da47a8d17","type":"ui_tab","name":"NEWLIVE","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

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

```auto
[{"id":"c357ee51a3ab8bf2","type":"ui_chart","z":"4cde86148e5b95f7","name":"","group":"fdedcd61c681d69a","order":8,"width":"9","height":"6","label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":425,"y":775,"wires":[[]]},{"id":"de84057cee7091c7","type":"inject","z":"4cde86148e5b95f7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{ \"series\": [\"X\", \"Y\", \"Z\"], \"data\": [[5,6,9,10], [3,8,5,10], [6,7,2,10] ], \"labels\": [\"Jan\", \"Feb\", \"Mar\", \"Apr\"] }]","payloadType":"json","x":205,"y":800,"wires":[["c357ee51a3ab8bf2"]]},{"id":"fdedcd61c681d69a","type":"ui_group","name":"LIVE","tab":"fbe9cc4da47a8d17","order":1,"disp":false,"width":"44","collapse":false,"className":""},{"id":"fbe9cc4da47a8d17","type":"ui_tab","name":"NEWLIVE","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![Javierv](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@Javierv](https://discourse.nodered.org/u/Javierv)
#### Post date: [5 July 2024 06:17 UTC](https://discourse.nodered.org/t/create-a-diagram-that-can-change-the-x-axis-label/88958/3 "2024-07-05T06:17:30Z")

</div>

Good morning!!  
I am a new user in node red and I have a chart already created in node red, I use the default chart in the dashboard.  
I send you a capture of this nodes.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/7380371c6bcd141aa337f5521c0c69eaf493d076.png)  
That you can see, I read the data registers in a txt file and show tha data in a table and in a chart for observe the test.  
Thankyou

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [5 July 2024 07:12 UTC](https://discourse.nodered.org/t/create-a-diagram-that-can-change-the-x-axis-label/88958/4 "2024-07-05T07:12:00Z")

</div>

It is really hard to answer your question as you have not shown  
the incoming data, how the data is display at current time, how you wish the data to be displayed and how your flow is configured.  
All this should be in a form that is copyable and well formed.

[How to import/export a flow](https://nodered.org/docs/user-guide/editor/workspace/import-export)

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path/value for any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<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: [4 August 2024 07:12 UTC](https://discourse.nodered.org/t/create-a-diagram-that-can-change-the-x-axis-label/88958/5 "2024-08-04T07:12:18Z")

</div>

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