javascript - Select row in HTML table to update chart selection? -


how setup html+js table data associated chart (flotr or d3); can multiselect rows , update shown in chart? - i'll using angularjs, two-way data-binding might of help...

e.g.:

<table>     <thead>          <tr><th>vowel</th> <th>amount</th></tr>     <thead>     <tbody>          <tr> <td>a</td> <td>3</td> </tr>          <tr> <td>e</td> <td>6</td> </tr>          <tr> <td>i</td> <td>7</td> </tr>          <tr> <td>o</td> <td>8</td> </tr>          <tr> <td>u</td> <td>9</td> </tr>     </tbody> </table> 

pie graph

would great able go reverse well, e.g.: pressing e , a on pie graph refresh pie-graph + table.

http://plnkr.co/edit/x1jgw0lqkyzv7eksvabj?p=preview

here example of how it.

once create directive connect data dom, simple matter of handling data model through template.

i reused flot integration directive used other project. (this 'reusability' love angularjs.)


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -