I am new to angular js. I am dealing with SVG which is taking fixed width and height. Because of this I am unable to make a responsive graph application. Can anyone tell me some methods in angular which helps me in getting through this error. thank You.....
2 Answers
You cal use AngularJS service $window and check for the resize event. Whenever any resize window event occurs , the function binded to the resize event will fire up and you can then redraw the graph. I solved my problem using this. Hop this works for you also....
1 Comment
You can use the viewbox in SVG to scale the image if that's what you're looking for. That way the contents always fit withing the SVG area even if it's scaled down or up. Here's an example: http://plnkr.co/edit/w2uOb9TSf8LWBAWyDdGm?p=preview
Use the button in the top right of the preview to open it in a new window, then you can see how scaling the window larger and smaller scales the contents of the SVG area. For some more details on the viewbox and how it works take a look here: http://tutorials.jenkov.com/svg/svg-viewport-view-box.html