Skip to content

Commit

Permalink
Fix redrawing charts on resize
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Nov 21, 2014
1 parent 515ae83 commit fcaec6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/crate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,18 @@ export default Ember.ObjectController.extend({
} else {
Ember.$('.graph').show();
}
data = google.visualization.arrayToDataTable(data);
var myData = google.visualization.arrayToDataTable(data);

var fmt = new google.visualization.DateFormat({
pattern: 'LLL d, yyyy',
});
fmt.format(data, 0);
fmt.format(myData, 0);
var el = document.getElementById('graph-data');
if (!el) {
return;
}
var chart = new google.visualization.LineChart(el);
chart.draw(data, {
chart.draw(myData, {
chartArea: {'width': '80%', 'height': '80%'},
hAxis: {
minorGridlines: { count: 8 },
Expand Down

0 comments on commit fcaec6b

Please sign in to comment.