Graph Information

Please any one tell how to draw graph in ionic?

See this https://github.com/saurabhgupta050890/ionic-chart-example.git

2 Likes

ok thanks for ur help

Check out d3 charts, or any of the other charting tools which work with Angular, I personally found d3 to be quite easy to implement, but I didn’t give them all a go. A quick google search for AngularJS charts should get you underway.

I’m at the same stage, looking for a plug-in for simple pie and line charts. I found this interesting analysis and angular-ready chart solutions: http://blog.lingohub.com/developers/2014/06/comparison-angularjs-directives-charts-front-end-app-development/

I think I am going to try her first suggestion, http://carlcraig.github.io/tc-angular-chartjs/

Later: It was almost trivial to add in Chart.js + tc-angular-chartjs and now my app has some beautiful donut charts.

As to the question of making them responsive, I’m not really sure what you mean. I put my donut charts in their own

and control the
visibility with a css media query, so that’s responsive.

Can u make the charts from Chart.js responsive. I have tried but was unable to so. i think this has to do something with them using canvas.

@saurabhgupta050 Am just giving a try .But getting error something like

TypeError: Object [object Object] has no method 'getContext' 

I have added canvas object in html file.