Adding legend example
Updating documentation to include showLegend
Adding showLegend code for Line chart
Adding text width to calculations
Removing a console statement
Removing textWidth var and adding it to gap for showLegend
Added some simple text wrapping logic for long legends
Changing space iterator to use z instead of i
Moving the calculateLegendWidth() function up to fix some firefox bugs
Adds legends to bar charts
This centralizes the show legend code into a function that can be called easily for multiple charts. This adds legends for barcharts if showLegend: true