Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Display CSV columns as rows in chart

Konstantin Pelykh asked on April 26, 2018

I’m trying to figure out if it’s possible to display the following CSV structure:


I need to plot term1, term2 and term3 on X axis and its value on Y axis. In other words I want to convert CSV columns (term1, term2, term3) into table rows 
What I’m trying to achieve can be easily done with the following CSV, however my goat is to optimize CSV size and reduce number of CSV rows


If it’s not possible with CSV, would it be possible if I use JSON instead, as in:
{“id”: 1, “term1”: 10, “term2”: 20, “term3”: 5}

5 answers

Ian Sadovy Ian Sadovy Flexmonster April 26, 2018

Hello Konstantin,
Thank you for the question.
Are you trying to achieve something like this – ?
The key point is to properly specify rows and columns fields.
I used JSON for simplicity, it is also possible with CSV.
Please let me know if it works for you.

Konstantin Pelykh April 26, 2018

Hello Ian,
Thank you for your response. Here’s what I’m trying to achieve.
but using more compact json representation

"data": [
"Category": "cat1",
"term1": 10,
"term2": 15
"Category": "cat2",
"term1": 20,
"term2": 40
Tanya Gryshko Tanya Gryshko Flexmonster April 27, 2018

Hello, Konstantin,
Thanks for the quick reply.
Here is the same sample showing a possible solution:
Does it work for your case?

Konstantin Pelykh April 27, 2018

Tanya, thank you for the example. It actually look pretty close to what I need. The only problem so far is that X-axis labels display “cat1” and “cat2” instead of terms. Is it possible to force it to display “term1” and “term2” under corresponding columns as in

Dmytro Zvazhii Dmytro Zvazhii Flexmonster April 30, 2018

Hello Konstantin, 
Thank you for your feedback. It is not possible to force charts to display “term1” and “term2” under corresponding columns when using such data configuration. The only possible approach is the following: In case it is not an option please consider using the excessive way of data representation.
Let us know if you have any other questions.

Please login or Register to Submit Answer