How to display information with JSON

Hey!

so what i need help with is, i want to create a graph (with the “graph(old)” option) and i want to input it as JSON and have the bottom axis, display different factors and the Y axis to display values. I’d also like it to be bars and have three different kind of series that are stacked on each other. the issue i primarily have is that i don’t have any time or anything.

any and all help is appreciated

Hello.

Im not sure if you are able to do what you want with the Graph (old) panel. One way to display Json data is through grafana’s own json datasource (grafana-simple-json-datasource) which would then convert into data. You might want to check if that would meet your needs.

One other way would be developing a panel plugin that would plot a graph given the json you give it.

so are you required to create graphs with time? doing a group project and the group has very much decided to go with grafana and given me the short end of the stick. they want a graph that is bars and stacks on each other.

Well, I am sorry that you ended up with the “short end of the stick”. I didn’t say its required since i haven’t tried to create one without timeseries.

There are, however, other panels that might suit better your use case. The Bar Chart might be an example. Its a graph of bars. The tooltip even says its a “Categorical Chart with group support”. You might want to check that one out

yeah looks like that’s the option we’ll have to go for.
I find it somewhat strange the fact that you can’t have the simple option of hard coding your own values in grafana to get it displayed

thank you for your help

if you could provide some sample json we could try to help you with making stick shorter :slight_smile:

Hi! sorry for the late respond, had to fix some stuff up. since we’re working with sensitive information, i had to create some dummy json.
the thought is, i want “group” to be on the X-axis, with low, medium and high to be series, and have their value displayed on the Y-axis

{
“group”:[ {
“Low”: 123,
“Medium”: 456,
“High”: 789
}
]
}

Is this coming from an api or is it a file on disk? And is this the real structure of the data?

using infinity plugin

1 Like

using json api plugin