15

I have a Google Sheets document with four columns of data. I have a chart on the right side. When you scroll down to see all the data, the chart scrolls up off the screen.

Is there a way to make it static or float?

1
  • there is no "onScroll" event trigger on Google Apps Script, so I assume this cannot be done inside google sheets. There is a "onSelectionChange" that might be helpful for such scenario, that, programatically, can change the location of the chart on the sheet. Nov 30 '20 at 23:07
0

If the chart is fairly simple, you can use a sparkline() formula to recreate it in a cell that remains stationary in the frozen section of the sheet.

Use View > Freeze > [n] rows to insert a frozen section. To give the sparkline more space, use Format > Merge cells.

See the sparkline() help page.

1
  • As an alternative to this, but still using @doubleunary's concept of placing this formula in frozen cells, you could use the REPT function to create a mini-chart. See Ben Collin's article on this: benlcollins.com/spreadsheets/rept-function (for this specific use case, scroll/search for "Bar chart with REPT Function". Apr 6 '21 at 17:02
-1

TEMPORARY SOLUTION

If you really need this AND you are not afraid by code, you can do it by editing CSS of your current page. Next refresh of your page, you will have to redo this

On Chrome :

  1. Press Ctrl + Shift + I
  2. Select your graph
  3. In the Elements tab, select the parent of your graph that is in my test <div class="waffle-borderless-embedded-object-overlay"
  4. In the Styles tab
    1. Replace position: absolute; by position: fixed;
    2. Adapt values of top and left properties to the pixel values wanted (Click on each value and use arrows of your keyboard to adapt in live)
2
  • What/where is the Elements tab? Feb 3 '21 at 23:18
  • 1
    Sorry @JoelMellon , it is Ctrl + Shift + I not Ctrl + Shift + C
    – jteks
    Feb 17 '21 at 0:23
-3

I would (always) suggest to put the graph into a separate sheet. Here's how you do that:

enter image description here

2
  • 3
    This fails to address the question at all and likely makes matters worse since someone with this concern is likely trying to scroll through data while looking at their chart. Sheets has a bug now where freezing rows causes the chart to move below the frozen row and scroll anyway.
    – rainabba
    Sep 18 '19 at 16:00
  • @rainabba Fair deal. Why don't you post that, or any other insight, as answer? Sep 19 '19 at 7:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.