Search code examples
google-sheetssparklines

How to properly normalize sparkline column chart in Google Sheets


See image below for reference.

enter image description here

When I simply create a column chart of the items in column A, I get what seems like improperly scaled columns? 5 looks like just a line where 10 would seem to fully occupy the vertical height. I believe this would count as a Normalization problem? Correct me if I'm wrong. Anyhow, the solution seemed to be the ADDING of Zero as you'll see in D3. This has its own problem, though: The addition of an additional column - what would have been 4 columns is now 5 (the first one being invisible since it is just 0).

TL;DR: How can I use sparklines wherein I don't have to add additional zero AND STILL retain the normal scaling of columns as in the case of regular column charts (i.e. non-sparkline)?

I could share the link to the sample sheet, if you need them. Thank you.


Solution

  • The problem is not one of normalizing the data; it's a problem with the graph axis not starting at 0. To give the bars properly scaled heights, force the y-axis to start at 0:

    =SPARKLINE(A2:A5,{"charttype", "column"; "ymin", 0})