javascript - making a gviz chart with AngularJS -
i'm trying make gviz pie chart example here example https://google-developers.appspot.com/chart/interactive/docs/quick_start in angularjs.
what services need write?
the example code above uses
- a google ajax library load gviz library
- a gviz datatable.
- a gviz pie chart
document.getelementbyid
it seems i'll need write own service each of these, except $document
. true? seems awful lot of boiler plate =/ (side question, why wrapping these service thing?)
can take stab @ datatable service might like? i'm not sure how access google.visualization.datatable()
'translate' line.
var data = new google.visualization.datatable();
i'd have give closer look, would want create 1 directive. looks cool charting package. if want ideas on wrapping components in directives @ angularjs wiki page (version 1.0.0 ones) on github , there offshoot group angular-ui i'm involved in wrapping , creating reusable angular components.
Comments
Post a Comment