Use js  instead of php script for extracing csv data

here is an example of how to get the csv extraction done on client side.
code from http://stackoverflow.com/questions/17836273/export-javascript-data-to-csv-file-without-server-interaction
get file name from chart title
check for download attribute support

check for download attribute support
 use server side extraction if not supported
 use client side extraction if supported
Merge pull request #21 from danreb25/patch-1

Use js  instead of php script for extracing csv data