Create Bar Graph from CSV in Grafana

Hi, all, I’m fairly new to using Grafana and just trying to demonstrate how to generate a bar graph from CSV data. I have a simple dataset of two columns and four rows that I am trying to display as a bar chart/column graph, but I can only display the content as a table. The data is not necessarily a time series dataset, but I cannot figure out how to convert it or adjust my panel settings to display it as a bar chart. Here is the dataset I am trying to visualize as a bar chart:


Any assistance is most appreciated!

@sowdenraymond - Thank you for your assistance. The visualization you displayed is exactly what I am trying to replicate. I matched the configuration settings you show (e.g. Infinity data source, Bar Chart visualization), but can you please confirm the transformation that you used? I believe this may be the final piece I am missing for my visualization, below is what renders on my end when trying to match your settings:

the transformation was convert field type, to change the number field to be a numeric.

@sowdenraymond - Thanks for clarifying, this worked! I’m just about there in replicating your graphic, as I would also like to customize the color scheme per bar/line. I added thresholds by value, but the colors are constant for each bar. Is there a specific setting to set to get the different colors for each bar? Thanks again for your help!

Switch the “gradient mode” to Scheme. That does the trick.

1 Like

@joachimschiewek - Thank you for your insights, that did indeed do the trick! I will concur to you and @sowdenraymond as providing the correct solution.

Since you are using infinity, use the column formatting option available in query editor to convert the values to number as shown below

1 Like