Changed directive.js to now resize the chart when the window is resized