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.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/79ed33c9-ee0a-428b-b22d-052fc9e30a3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to