# Change the X and Y axis labels in Chart

**URL:** https://discourse.nodered.org/t/change-the-x-and-y-axis-labels-in-chart/35782
**Category:** Dashboard
**Created:** [12 November 2020 04:41 UTC](https://discourse.nodered.org/t/change-the-x-and-y-axis-labels-in-chart/35782 "2020-11-12T04:41:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vishakraj](https://avatars.discourse-cdn.com/v4/letter/v/9dc877/32.png) [@vishakraj](https://discourse.nodered.org/u/vishakraj)
#### Post date: [12 November 2020 04:41 UTC](https://discourse.nodered.org/t/change-the-x-and-y-axis-labels-in-chart/35782/1 "2020-11-12T04:41:30Z")

</div>

Hello, I am new to node red, I created a csv node to read csv file, then to a function, which extract two columns, like this

```auto
var output = [];
var g_total_time = [];
var g_energy= [];

for(let i=0; i<data.length; i++)
{
    var t_energy = { "x":data[i]["Total_Time"] , "y":data[i]["Energy"] };
    g_energy.push(t_energy );
}

output = [
    g_energy,
]

msg.payload = [
    {
        "series":['Energy',],
        "data": output,
        "labels":['Energy',],
    },
    ];
return msg;

```

And, I pass the msg to a chart in dashboard panel(Line Chart)....

Here, I used two columns in csv file for ploting chart, Total\_Time - total time taken for the work in minutes(like- 20.03), and Energy level(like-20001).

In Default, the x-axis is shown as time axis in the chart node, how to change the x-axis, so that, I can plot total\_time in minutes

Thanks

---

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [12 November 2020 06:35 UTC](https://discourse.nodered.org/t/change-the-x-and-y-axis-labels-in-chart/35782/2 "2020-11-12T06:35:50Z")

</div>

Try this configuration for x-axis label

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/86b677d27c52fd0a99b6383d8803d5ffe5953b97.png)

---

<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: [26 November 2020 06:36 UTC](https://discourse.nodered.org/t/change-the-x-and-y-axis-labels-in-chart/35782/3 "2020-11-26T06:36:12Z")

</div>

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