I’ve seen below solutions but still can’t figure out how to display data using Infinity data source. Probably because my case is slightly different.
One of my applications generates 100 pairs of X-Y coordinates every hour and I can convert them to any JSON structure. So far I’ve tried the following:
JSON array of charts - in this case Grafana shows single line for both charts
But I need to see both of them on the same panel with different colors and (if possible) timestamp of each plot. Sounds like I need some magic in Rows/Root field.
Here is better picture of what I want to achieve. Works perfect with multiple queries but do you think it is possible to get the same visualization with a single query?
Or maybe some others solutions? All my JSONs are stored in MySQL database so maybe it is possible to add queried dynamically?
This then generates a single table, with 6 rows (I added another series further in the test which is why my image has 3 series). The issue is that the XY does not produce differing series when in a single table, there needs to be grouping - so instead of single rows, you need to group by some series field. This is especially critical if you have data which is varied - e.g. sometimes you get 6 series, sometimes 1. It saves you having to define each series.
After your parse/query from infinity, you need to transform the data. Add a transformation “Partition by values” this will split the series based on the field you’ve added in the jsonata parsing. Choose field “series”, naming “as label”, leave the “Keep fields” well alone / default.
If you look at the panel in “Table view” you should see that there are only 3 rows, and you can select different series below the rows in a dropdown.
Configure the XY panel, make sure all frames is selected in Frames, X as X field, Y as Y field.