Exposed the "resize()" function of c3 to outside.

Hi Max,

I'd like to expose the resize() function from c3; I need to call it when resizing the div which contains the chart but not resizing the window itself.

Unfortunately, I could not figure out how to test this functionality. I don't know how to get the "chart" property of the directive in the test. If I could, I would maybe test it like this:

  describe('. resize', function () {
    it('- Resize on chart should be callable from outside.', function () {

      directiveScope.chart = {resize: angular.noop};
      spyOn(directiveScope.chart, 'resize');
      elementScope.options.resize();

      expect(directiveScope.chart.resize()).toHaveBeenCalled();

    });
  });
Where directiveScope is the scope of the directive and elementScope is the scope of outside.


Something else: Unfortunately, it seems that indentation of my changes are not correct. Can you tell me, how to use your project style in Webstorm/PHPStorm?