Njax3SmmM2x2a0Zf7Hpd
Njax3SmmM2x2a0Zf7Hpd

Reputation: 1364

Google Charts How to make the Chart re-sizable?

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

Upvotes: 0

Views: 174

Answers (1)

jterry
jterry

Reputation: 6269

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 :)

Upvotes: 1

Related Questions