Generating charts from accessible data tables. Using this MooTools plugin you can take a simple, valid and accessible data table and it gets automatically converted to a pie chart. Simply add the script to the end of the body and it'll convert all tables with a class called 'toChart'. You can define the size and the colour.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Docs
Source
demo
README.md
package.yml

README.md

table2chart

This is a plugin MooTools that generates charts from accessible data tables. So, you can take a simple, valid and accessible data table and it gets automatically converted to a pie chart. Simply add the script to the end of the body and it'll converts all the table with a class called 'toChart'. You can define the size and the colour within the attribute class of the table (like: class="toChart size700x300 color29b34f").

Screenshot

How to use

First you must to include the JS files in the head of your HTML document.

   #HTML
   <script type="text/javascript" src="mootools.js"></script>
   <script type="text/javascript" src="table2chart.js"></script>

In your HTML source:

BrowserPercent
MSIE20
FireFox100
Camino70
Opera90
Safari90

Add the script to the end of the body:

   #JS 
   <script type="text/javascript">
     new Table2Chart(); 
   </script>

OR wait until dom is ready

  #JS 
  <script type="text/javascript">
  window.addEvent('domready',function(){
     new Table2Chart();   
  });  
  </script>

Dependencies

  MooTools Core 1.3