VizSoup

CSV to bar or line chart

Paste a table with a label column and one or more number columns. The chart redraws as you type, and the download is a plain SVG file that stays sharp at any size.

Sample: invented monthly order counts for a small shop. Replace it with your own.

Chart type
Series to plot (up to 8)
Orders by monthBar chart of Online orders, In-store orders across 12 categories.02004006008001,000Jan · Online orders: 412Jan · In-store orders: 655Feb · Online orders: 388Feb · In-store orders: 610Mar · Online orders: 455Mar · In-store orders: 702Apr · Online orders: 478Apr · In-store orders: 690May · Online orders: 520May · In-store orders: 731Jun · Online orders: 561Jun · In-store orders: 748Jul · Online orders: 598Jul · In-store orders: 705Aug · Online orders: 583Aug · In-store orders: 712Sep · Online orders: 540Sep · In-store orders: 736Oct · Online orders: 602Oct · In-store orders: 760Nov · Online orders: 744Nov · In-store orders: 842Dec · Online orders: 861Dec · In-store orders: 977JanFebMarAprMayJunJulAugSepOctNovDecOnline ordersIn-store orders
Read 12 rows × 3 columns, comma-separated.

The numbers behind the chart

Every plotted value, so nothing depends on reading colours or bar heights. Blank or non-numeric cells show as a dash and are left out of the chart.

Month Online ordersIn-store orders
Jan 412655
Feb 388610
Mar 455702
Apr 478690
May 520731
Jun 561748
Jul 598705
Aug 583712
Sep 540736
Oct 602760
Nov 744842
Dec 861977

How to use it

  1. Paste your data into the box, or open a .csv file. Copying a block of cells straight out of Excel, Google Sheets or Numbers works too: those paste as tab-separated text, and the delimiter is detected automatically.
  2. Check the label column. It defaults to the first column that is mostly text, such as months or product names. Every column that is at least 80% numbers is offered as a series.
  3. Tick the series you want, choose bar or line, and give the chart a title.
  4. Download the SVG. The file contains the colours that were showing on screen, so a chart made in dark mode downloads with its dark background.

How the data is read

The parser follows RFC 4180, the closest thing CSV has to a standard. A field wrapped in double quotes can contain commas, line breaks and quotes written twice ("say ""hi""" reads as say "hi"). A byte-order mark at the start of the file, which Excel adds to UTF-8 exports, is ignored, and Windows and Unix line endings both work.

To guess the delimiter, the tool parses the first rows with comma, semicolon, tab and pipe in turn and keeps the one that gives the most consistent number of columns. Semicolons matter because spreadsheets in much of Europe use a comma as the decimal mark and a semicolon between fields. If the guess is wrong, set the delimiter yourself.

Numbers are read the way people type them into spreadsheets: 1,234.5, $1,000, 12% (read as 12), and accounting negatives such as (250). A comma is only treated as a thousands separator when it sits in groups of three, so 1,23 is rejected rather than guessed at. European decimal commas such as 3,5 are not converted; change them to points first.

A worked example

The sample has twelve months and two series, online and in-store orders. The bar chart shows each month as a pair of bars. December has the largest values (861 online and 977 in store), and the y axis runs from 0 to 1,000 in steps of 200. The axis maximum comes from a "nice number" rule: the range is divided into about five steps, and each step is rounded up to 1, 2, 2.5 or 5 times a power of ten. That is why the ticks read 200, 400, 600 rather than 195.4, 390.8 and so on.

Switch to a line and the axis is fitted to the data, from 300 to 1,000. Online orders more than double across the year, from 412 to 861, which reads as a steep climb in the second half. On the bar chart the same change is still visible but less dramatic. That difference is the reason for the next section.

Choices the tool makes for you, and why

ChoiceRule used here
Bar baselineAlways zero. A bar's length is its value.
Line baselineFitted to the data, zero optional
Missing value in a lineThe line breaks, never bridges the gap
ColoursEight fixed slots, always in the same order
LegendShown for two or more series only
Crowded labelsAngled, then thinned to at most 24

The colours are assigned by position: the first series you tick is always blue, the second orange, and so on. The order was checked with a colour-vision-deficiency simulation so that neighbouring series remain distinguishable for the most common forms of colour blindness. Some light colours are pale against a white background, which is one reason the page also prints every value as a table. Hover over any bar or point to see its exact value.

Where this tool stops being the right one

It draws one chart type at a time on one y axis. There is deliberately no second y axis: two scales on one chart let the author make any two lines appear to move together. If two series have very different sizes, chart them separately. It does not parse dates, so time runs in the order your rows are in and gaps between dates are not spaced proportionally: if a month is missing from your rows, its neighbours are simply drawn next to each other. With several hundred rows, the labels thin out and bars become slivers; a histogram or a pivot that summarises first usually says more. For shares of a total, use the pie chart maker.

Common questions

Should I use a bar chart or a line chart?

Use bars when the categories are separate things (products, regions, survey answers) and you want to compare their sizes. Use a line when the categories are points in time or another ordered sequence and the shape of the change is the story. If shuffling the rows would not change the meaning, it is a bar chart.

Why does the bar chart always start at zero but the line chart does not?

A bar encodes its value by its length, so a bar axis that starts at 500 makes 600 look twice as big as 550. A line encodes change by slope, so fitting the axis to the data is normal and makes the movement readable. Tick "Start the line chart at zero" if you want the line on a zero baseline anyway.

How do I get the chart into Word, PowerPoint or Google Slides?

Download the SVG and insert it as a picture. Current versions of Word and PowerPoint accept SVG directly and keep it sharp at any size. Google Slides does not accept SVG, so open the file in a browser and take a screenshot, or convert it to PNG with any image editor.

Can I chart more than eight columns?

No. The chart uses a fixed set of eight colours chosen so neighbouring series stay distinguishable for people with the common forms of colour blindness. Beyond eight, colours start to repeat and a legend stops working. Split the data into two charts, or use the pivot tool to combine the smaller series first.

Is my data uploaded anywhere?

No. The CSV is parsed and the chart is drawn by JavaScript running in your browser tab. Opening a file reads it locally, and the download is created in the browser as well. Nothing is sent to a server, which you can confirm in your browser developer tools on the network tab.

Other tools