Skip to content

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.

thinkphp/table2chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Resources

Stars

Watchers

Forks

Packages

No packages published