0

I wonder If Google Charts API provide options to resize the Chart element? Or is there any workaround for that?

Njax3SmmM2x2a0Zf7Hpd
  • 1,354
  • 4
  • 22
  • 44
  • 1
    http://stackoverflow.com/questions/8950761/google-chart-redraw-scale-with-window-resize – jterry Jun 20 '13 at 12:09
  • @jterry thanks for the link. I read that before posting. not sure Iam duplicating it. Mine doesn't actually involve window resize. just a control that allows resize. e.g. Chrome textarea – Njax3SmmM2x2a0Zf7Hpd Jun 20 '13 at 15:22

1 Answers1

1

Per your comment -- you could augment the solution in this answer by tapping into jQuery's resize method:

$('#your_element_id').resize(function() {
    var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
    chart.draw(data, options);
}

I'm assuming that the answer in the previous question is valid, but it's accepted so it likely is :)

Community
  • 1
  • 1
jterry
  • 6,209
  • 2
  • 30
  • 36