Dynamically Create Charts in Google Sheets – Formulas and Charts

formulasgoogle sheetsgoogle-sheets-charts

I'm looking for a way of automatically generating a graph based on a constantly expanding dataset.

The number of columns is constantly expanding (a program create a new column with new datasets for each day).

I want to generate a graph based on the sum of each column. I can generate a sum using:

=SUM(index(SPLIT(filter(Date_Log!F2:F, len(Date_Log!F2:F)), ":"), 0, 1))

but the generating a graph part based on X number of columns is unknown.
It could probably be achieved by "automatically" copying the formula for calculating sum to the top of each column. But the "Automatically" part for each new column generated is also unknown.

dataset

Best Answer

  • you can use SPARKLINE() and do not include ending column (A9:9):

=SPARKLINE(A9:9, {"CHARTTYPE","LINE";"COLOR","GREEN";"LINEWIDTH",4})

1


  • if you want to use a chart then you will need to add some unreasonable amount of columns first and then construct your chart (like for example: A9:GG9)

2