3 ms·
I'm currently implementing charts using Flot with AngularJS data-binding and directives. I had to find a workaround to the fact that Flot requires fixed width.
by conradfr 14y ago
I'm currently implementing charts using Flot with AngularJS data-binding and directives.
I had to find a workaround to the fact that Flot requires fixed width. xCharts does not suffers this limitation but I will have to evaluate d3.js first.
- beefsack 14y agoD3.js as an Angular directive is a thing of beauty, once you get your D3.js graphics updating live from your Angular data you can do some very nice dynamic graphics with very little code, whether it be graphs or otherwise. Brian Ford gives a nice example in his blog and on GitHub: http://briantford.com/blog/angular-d3.html http://briantford.com/blog/angular-d3.html https://github.com/btford/angular-d3-demo https://github.com/btford/angular-d3-demo
- conradfr 14y agoThanks for the feedback and links, will look into it now.
- theshadow 14y agoWhy would having a fix width be a problem? In my mind the alternative is the canvas automatically expanding to the right and thereby requiring horizontal scrolling through the browser. Flot.js supports panning if you need to stretch out your xaxis which seems cleaner to me than horizontal scrolling in the browser.
- conradfr 14y agoI have a fluid layout (with Bootstrap grid) with the screen divided in two panes, and I'd like the chart to take all the width of the pane is in. Hope that makes sense.