Replies: 2 comments
-
The main reason I haven't added custom time formats already is because I haven't figured out a nice UX for how to configure it. I think we'd need something like:
Problem is how we cram all of that into each Field row without messing up the whole query editor 😅 We could extract the setting to set a global format, but I'm sure I'll see another feature request where they have an API with mixed time formats in the response as well. This likely won't be my priority for a while, but I'd be happy to collaborate if anyone wants to help out with the design. |
Beta Was this translation helpful? Give feedback.
-
Thanks Marc, sounds like a good idea and should work. If I can offer a suggestion UX-wise perhaps have these parsing options you mentioned available when you first setup the data source as part of the Settings. Then when setting it up you could add your customer formats that could then be used in the Dashboard transparently. Just an idea. What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been trying to use this plugin to interface with a JSON API that I have access to. Here is a detailed description of the problem:
I am able get a workable set of data in a table format but the time column (readable string) is using a format that the plugin/Grafana itself does not seem to recognize meaning that when I try to set the “Type” to “time” it only gives me a “NaN” for value of that column. As I understand it (also confirmed in the Grafa forums) Grafana itself does not support a way to either manipulate the string value (replace/remove the extra characters) or define a custom format. This means that, despite of having all the data available I'm not able to plot a graph.
Now my question would be how feasible would it be to improve the parsing or provide a way to manipulate the string value so that the time column could be used?
The format:
The NaN after setting the “Type” to “time”:
I understand that a solution for this would be to change the API itself. However this API is lacking support since the guy in charge is busy with higher priority tasks and I have no access to it. That means that changing the source data format isn't really feasible as a solution.
Thoughts?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions