Integer vs Integer axis in grafana

Hello all!

I would like to show some points on a graph… The problem is, that what I put in as X value is seen as string, so if I have 3 points on my x axis, for example 1 , 2 , 5, it will print them out as 1, 2, 5 with its correspondig values. what I would need is that it treats the X values as integers, so it will print 1,2,3,4,5.

I basically want to create a non time series data to visualize data rate vs bandwidth as a line chart

Can this be done?

Thank you!

welcome to the :grafana: forum, @moksh

do you have any examples or a screenshot of what you want? Or some sample data?

it looks like you might want to use the Bar Chart, which can use arbitrary strings on the x axis:

https://play.grafana.org/d/ktMs4D6Mk/5-bar-charts-and-pie-charts?orgId=1

See the docs for the data model that you will need to fit:

Het Matt,

Thank you so much for your response.

What I am looking for is a way to plot x vs y where I provide the scale for x axis and I get a line chart plotted.

As a sample, my data looks something like this:

| Memory (X)      | Bandwidth (Y) |
| ----------- | ----------- |
| 1000        | 5.4         |
| 2000        | 6.5         |
| 3000        | 7.4         |
|             |             |
|             |             |

I want to plot a line chart so that I can visualize the effect of bandwidth over memory.

Thanks
Moksh Jain

I believe the only line chart you can get is timeseries chart but that requires time column. Your best option is bar chart

Yeah, it seems that is the only thing right now, but a bar chart doesn’t help me because I have 81 values on the X axis and having 81 bars will defeat the purpose of visualization and the values on X axis will overlap each other which makes it even difficult to read.

In addition to that, grafana is treating the values in X axis as strings, so I get bars 1000, 10000, 100000 instead of 1000, 2000, 3000…

It is surprising that this is not possible in Grafana which is why I am looking to switch my visualization tool to something which can better handle non-timeseries data.

Thanks for all the help.

What is your data source? there are ways to fake the time series part. Here is an example with sql server fake date field