# Line Chart X-axis Label Format

**URL:** <https://discourse.nodered.org/t/line-chart-x-axis-label-format/18284>\
**Category:** General\
**Created:** [22 November 2019 14:04 UTC](https://discourse.nodered.org/t/line-chart-x-axis-label-format/18284 "2019-11-22T14:04:14Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [22 November 2019 16:16 UTC](https://discourse.nodered.org/t/line-chart-x-axis-label-format/18284/7 "2019-11-22T16:16:03Z")

</div>

> [@baqwas](#):
>
> It seems that the bar chart assumes x-axis is for categories. Is there any setting to change this interpretation such that successively values are treated as time series?

What you want is perfectly doable and will generate a nice bar chart indeed.

In order to populate the x-axis you will need to format the dataset to load time values as the "labels".

For instance, this msg.payload

```auto
[{
    "series": ["X", "Y", "Z"],
    "data": [[5,6,9], [3,8,5], [6,7,2] ],
    "labels": ["Jan", "Feb", "Mar"]
}]

```

Will generate this bar chart

 ![barchart-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/db20b7c2e605cac41afa14fe451c50700b886305.png)

Another good example is the one that @hotNipi posted here:

> [@Configurable X axis (bar graph) per time (hour - hour)](https://discourse.nodered.org/t/configurable-x-axis-bar-graph-per-time-hour-hour/6373):
>
> Hello, colleagues. How are you? Could you help me? What I want is: based on the real hour (just hour, without minut),in X axis, I want press my trigger and this will incremented each time when I press my trigger, like a counter. When the hour change (e.g. 10am - 11am) I have to put my variable increment in 0 to do the new counter. The graph is similar image below (without table). [Capturar] Do you have examples that I can do it? I mean, work with real time and set values in X axis (because…

---

_[View the full topic](https://discourse.nodered.org/t/line-chart-x-axis-label-format/18284)._
