Google Timeline Chart Go to position on redraw

12 views
Skip to first unread message

vlad99

unread,
May 16, 2017, 7:39:30 AM5/16/17
to Google Visualization API
When a chart is drawn, it scrolls to the top but I am trying to make the chart stay on the same place at redraw. Because I cannot see the source code, I tried to get the scroll position and scroll to it on redraw but it does not work. Can someone please help me or is there a better way of doing it. Thank you.

<div class="row">
   
<div class="col-12">
     
<div id="timelineDiv">
       
<div class="text-center">
         
<p class="mes">{{timelinecontr.mess}}</p>
       
</div>
       
<div class="col-12">
         
<div id="timeline" class="chart"></div>
       
</div>
     
</div>
   
</div>
 
</div>

#timelineDiv{
  overflow-x: scroll;
  overflow-y: scroll;
  white-space: nowrap;
  border: 13px solid #bed5cd;
  width: 100%;
  margin: 0 auto;
  position: relative;
  background-color: deepskyblue;
  height: 550px;
}

timelinecontr.pos = $('#timeline div').scrollTop(); // position
      $('#timeline div').scrollTop(timelinecontr.pos) // this is called on chart redraw



This message and attachments are subject to a disclaimer. Please refer to http://www.it.up.ac.za/documentation/governance/disclaimer/ for full details.
Reply all
Reply to author
Forward
0 new messages