# How to plot graph for non time series data as X axis

**URL:** <https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291>\
**Category:** Time Series Panel\
**Created:** [March 20, 2018, 11:16pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291 "2018-03-20T23:16:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikhlaque26](https://avatars.discourse-cdn.com/v4/letter/i/50afbb/32.png) [@ikhlaque26](https://community.grafana.com/u/ikhlaque26)\
**Post date:** [March 20, 2018, 11:16pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/1 "2018-03-20T23:16:46Z")

</div>

HI  
I am new to Grafana.  
I wants to plot a graph for below mentioned MySql table

![image](https://us1.discourse-cdn.com/grafana/original/2X/2/2dd8a36a2770e65de5ec946c51a7ee8418594c4c.png)

Y axis as ExecutionTime and X axis as TestName or TestID.

Could someone help me on this.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [March 21, 2018, 10:08pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/2 "2018-03-21T22:08:05Z")

</div>

Hi,

Please use [X-axis mode series](http://docs.grafana.org/features/panels/graph/#x-axis).

Marcus

---

<div class="post-metadata">

**Author:** ![ikhlaque26](https://avatars.discourse-cdn.com/v4/letter/i/50afbb/32.png) [@ikhlaque26](https://community.grafana.com/u/ikhlaque26)\
**Post date:** [March 21, 2018, 11:10pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/3 "2018-03-21T23:10:21Z")

</div>

Hi Marcus  
I manage to plot Bar like

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/b/b6c5679a706d61886a99acf32abcb0c4df109583.png)

But I wanted to have a graph like

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/1/145943a8cfc3f5b4dccbbc68915cebebbe4f7789.png)  
 ![image](https://us1.discourse-cdn.com/grafana/original/2X/1/18335418895620296e8a8df2bf900f6599108674.png)

When I executed the below query query , I get null value for series.  
could you please help me ,to plot the graph

SELECT  
UNIX\_TIMESTAMP(ExecutedAt) as time\_sec,  
TestExecutionTime/1000 as value,  
TestName as metric  
FROM mqa\_performance\_msql\_db01.tbl\_tests  
WHERE TestName=‘UserLogin’ and $\_\_timeFilter(ExecutedAt)  
ORDER BY ExecutedAt ASC

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/7/705f6c957e8cfd0d272be80fb83ff363c1c861bd.png)

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [March 21, 2018, 11:24pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/4 "2018-03-21T23:24:40Z")

</div>

You probably need to group by executedAs and testname. But it seems like your where clause are making the query match no rows?

---

<div class="post-metadata">

**Author:** ![ikhlaque26](https://avatars.discourse-cdn.com/v4/letter/i/50afbb/32.png) [@ikhlaque26](https://community.grafana.com/u/ikhlaque26)\
**Post date:** [March 21, 2018, 11:37pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/5 "2018-03-21T23:37:38Z")

</div>

when I exclude $\_\_timeFilter(ExecutedAt) from the query then rows are returned but with error on panel as “Data point outside time range”

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/e/e8a700356f26396f7deab715ea8d5c0dd6cca480.png)

and when i add $\_\_timeFilter(ExecutedAt) in where clause no rows are returned.

ExecutedAt are not in fix interval , does it make any difference ?

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [March 22, 2018, 12:44am UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/6 "2018-03-22T00:44:34Z")

</div>

Probably timezone related. What timezone on grafana server vs mysql server? Quick workaround could be timeshift 1h

---

<div class="post-metadata">

**Author:** ![kfrench](https://avatars.discourse-cdn.com/v4/letter/k/91b2a8/32.png) [@kfrench](https://community.grafana.com/u/kfrench)\
**Post date:** [January 30, 2019, 3:17pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/7 "2019-01-30T15:17:26Z")

</div>

Good info @anon34853223! Your link seems to be slightly outdated (likely due to a wording change by the webpage manager). Could you update the link to [this](http://docs.grafana.org/features/panels/graph/#x-axis) when you get a second?

---

<div class="post-metadata">

**Author:** ![dsb](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dsb](https://community.grafana.com/u/dsb)\
**Post date:** [February 5, 2019, 8:18pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/8 "2019-02-05T20:18:24Z")

</div>

Need to piggy-back here. I’m having a similar issue to original poster. My dataset comes back but is graphed as if each day is its own series, where I would like it treated as a single series. is there a way to accomplish this? I’m not particular about whether it’s a bar or a line graph, I just want this series to return all the same color:

 ![image](https://us1.discourse-cdn.com/grafana/original/2X/a/a8a087653289918d4b5a7ed77fe9cc42d014d87a.png)

---

<div class="post-metadata">

**Author:** ![danielgonzalez](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/danielgonzalez/32/7125_2.png) [@danielgonzalez](https://community.grafana.com/u/danielgonzalez)\
**Post date:** [February 6, 2019, 2:12am UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/9 "2019-02-06T02:12:58Z")

</div>

you can try serier override, [here](https://community.grafana.com/t/using-day-as-x-axis-instead-of-time/14022/6?u=danielgonzalez) I explain it briefly

---

<div class="post-metadata">

**Author:** ![mayurmanurkar](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mayurmanurkar](https://community.grafana.com/u/mayurmanurkar)\
**Post date:** [June 19, 2019, 9:54am UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/10 "2019-06-19T09:54:48Z")

</div>

How did u managed to get the “bar” chart ? … i am facing problem here

---

<div class="post-metadata">

**Author:** ![sonnenterasse](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sonnenterasse](https://community.grafana.com/u/sonnenterasse)\
**Post date:** [August 29, 2020, 7:01pm UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/12 "2020-08-29T19:01:53Z")

</div>

Hello  
Can anyone help me how to make bar chart with the amount every month from this datas?

![Bildschirmfoto 2020-08-29 um 20.58.37](https://us1.discourse-cdn.com/grafana/original/2X/e/e6d4c1e95c17b0609f6f3698f1d9a972048b3fe4.png)

---

<div class="post-metadata">

**Author:** ![ashwinipattarjun18](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@ashwinipattarjun18](https://community.grafana.com/u/ashwinipattarjun18)\
**Post date:** [September 30, 2020, 4:33am UTC](https://community.grafana.com/t/how-to-plot-graph-for-non-time-series-data-as-x-axis/6291/13 "2020-09-30T04:33:17Z")

</div>

Hi can you plz show me how u did this .
