Archimedes Pelican

Angular.js and Pelican

Learn More About It    

This Dangular example adds the ability to push and pop elements of the data array, which in turn controls the pie chart. The controller begins by initializing the data array. Agnular then loops over each element of this array, and creates an HTML inptu widget for each array value. Each input widget is linked to the array value. Next we create buttons that are linked to various actions on the controller - reset, push, and pop. Each of these modifies our array of data. We then create our Angular directive, which utilizes the data to draw a pie chart with D3. This is using the same array of data that is linked to our HTML input widgets, and the same array of data that is being manipulated when we click the buttons on the page.

A dynamic donut chart:

reset stuff

push stuff

pop stuff

 

Made with by charlesreid1.