1

If I click out of the main screen,then return I see the graph doesn't resize correctly.

The HTML is simply (Some of the styling is for debugging/testing):

<div class="panel-body" ng-show="graphType !== 'Mood Sentiment'" style="width:100%; max-width:100%;">
      <flot id="placeholder" dataset="dataset" options="options" height="300px" style="width:100%; max-width:100%;"
            ng-disabled="graphLoading" ng-class="{disabled:graphLoading} "></flot>
    </div>

What its doing:

Incorrect sizing of flot chart.

What I want it to be doing:

Correct sizing

David van Dugteren
  • 3,879
  • 9
  • 33
  • 48

1 Answers1

2

I haven't used flot but a search looking for resize issues with flot in angular found this, one of the comments suggested the flot-resize plugin solved their issues using it with angular.

How to make flot responsive?

I'd suggest trying to include the flot resize js in your app and see if that fixes it.

<script src="../../jquery.flot.js"></script>
<script src="../../jquery.flot.resize.js"></script>

See: http://www.flotcharts.org/flot/examples/resize/

Community
  • 1
  • 1
Nicholas Hirras
  • 2,592
  • 2
  • 21
  • 28