added libraries/tbl_chart.lib.php and extracted methods to generate html content
Merge pull request #631 from scnakandala/refac_tbl_chart

Refactoring tbl_chart.php